Home Accessing the index in 'for' loops?
Reply: 0

Accessing the index in 'for' loops?

user254
1#
user254 Published in May 28, 2018, 9:48 am

How do I access the index itself for a list like the following?

ints = [8, 23, 45, 12, 78]

When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.648242 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO