Return Last 50 posts First 100 posts
Hey /prog/rammer.
1 Name: Anonymous : 2017-04-21 09:31
https://i.imgur.com/6jLSiBL.pngCan someone explain me what is going on in the second line of code?
2 Name: Anonymous : 2017-04-21 09:44
there's 3 elements in 'names'.
for every element in 'names': print "Hello," + element
3 Name: Anonymous : 2017-04-21 09:49
"i" is an automatic iterator.
It goes through the whole list "names" and copys the value in every place on itself.
4 Name: Anonymous : 2017-04-21 09:53
it seems you're creating a loop to go through the array called "names" and using a placeholder name "i" for each value, and in the next line you're showing what you plan to do with this value "i"
also, lul, whattta fack mang , code an shittt XDDDDD
5 Name: Anonymous : 2017-04-21 09:57
for i in names means that it sets i to the first element of the names array, then the second etc.
that means first i = John, then i = Buba, then i = Pete
6 Name: Anonymous : 2017-04-21 10:01
7 Name: Anonymous : 2017-04-21 10:06
>>6before you do something stupid,how is i declared?
8 Name: Anonymous : 2017-04-21 20:55
>>7dynamically on the heap?
Return Last 50 posts First 100 posts