What is for loops, in easy way?


#1



what is for loops in very easy way with some examples??

why it only print 'Prisila' not all the 3 itemes in list. i'm very confused.

for friend in ['Margot', 'Kathryn', 'Prisila']:
    invitation = "Hi " + friend + ".  Please come to my party on Saturday!"
    print(invitation)


Replace this line with your code.


#2

i put your code on repl, and it seems to work fine?

it prints out the 3 different names


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.