technical skills grow

Responsive Ads Here

Thursday, September 10, 2020

Enumerate Function in python


 

 

It is give index and item so we can use index or item values in enumerate function

I want to print  odd value items 

 ll = ["A","B","C","D"] 

for index, item in enumerate(ll):

 if index%2 == 0:

 print(item)

 output :A  C


No comments:

Post a Comment

Powered by Blogger.

Labels

Contact Form

Name

Email *

Message *

Search This Blog

Blog Archive

Ad Code

Responsive Advertisement

Recent Posts