Table of Contents

Liste

numbers = [0,1,2,3]
fruits = ["apple","banana","orange"]

Ajouter

lst = [] # this a list, but it's empty !
for i in range(3):
  lst.append(i)
print(lst)
[0,1,2]

Parcourir

for f in fruits:
  print("I like " + f + " !")
I like apple !
I like banana !
I like orange !

Accéder

pomme = fruits[0]
banane = fruits[1]
print("I like " + pomme + "s !")
>>> I like apples !