Advertisement
Felanpro

for-loop

Jul 16th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. kill_list = ["Justin Bieber", "Justin Timberlake", "Nicki Minaj", "Rihanna"]
  2.  
  3. for x in kill_list: #Set x = all strings in the list and go through them all.
  4.     print(x)
  5.  
  6. print("------------------------") #To seperate the two loops.
  7.  
  8. for y in kill_list[:2]: #Rihanna isn't worth my time anyways.
  9.     print(y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement