Guest User

Untitled

a guest
Oct 21st, 2019
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def print_list(soort, lijst):
  2. print(f"Verzameling {soort}:")
  3. for getal in lijst:
  4. print(f"{getal} zit op positie {lijst.index(getal)}")
  5.  
  6.  
  7. lijst1 = [12, 45, -9, -15]
  8. lijst2 = [12.23, 45.1, 9.478, 15.125, -3.14]
  9. lijst3 = ["Dieter","Christophe", "Stijn"]
  10.  
  11. print_list('gehele getallen', lijst1)
  12. print_list('komma getallen', lijst2)
  13. print_list('strings', lijst3)
RAW Paste Data