Sep-23-2017, 02:30 PM
Hey Programmers...
I try to create an names for loop (= diffrent strings in an list). But it don't work perfectly.
This is my code. I use python 3.6.2:
I try to for loop the above strings in an list. But the names are printing all et once.
I get no error, but it work's imperfectly. I want to print each name per-string, called
into my list (names = list([name1... name5])). But python don't doe thad at my way.
Can anyone help my to correcting my code ?... i don't know the way about how i can
print each name per-string, called with my for loop.
Can anyone help me ?...
Thanks, Jamie.
I try to create an names for loop (= diffrent strings in an list). But it don't work perfectly.
This is my code. I use python 3.6.2:
1 2 3 4 5 6 7 8 9 10 |
name1 = "Jamie" name2 = "Stuart" name3 = "Shelley" name4 = "Sacha" name5 = "Wesley" names = list ([name1, name2, name3, name4, name5]) for x in names: print (x) |
I get no error, but it work's imperfectly. I want to print each name per-string, called
into my list (names = list([name1... name5])). But python don't doe thad at my way.
Can anyone help my to correcting my code ?... i don't know the way about how i can
print each name per-string, called with my for loop.
Can anyone help me ?...
Thanks, Jamie.