How many usages of 'for'?


#1

I want to know the usage of ‘for’ in Python, but when I search “for” in Python homepage,it returns nothing! Is there something wrong with my way? So, can someone conclude the usage of “for” ? I will appreciat it if you give some examples which like the Matlab help pages.Thank you very much!


#2

did you check the wiki:

https://wiki.python.org/moin/ForLoop

there are many situations which might require for (looping over tuple, dictionary, string, list and more)


#3

Thank you! I learned more