a=['U', 'P', 'V', 'D'] b=[] for c in a: b.append(chr(ord(c)+1))
list(range(1,4,2))
sort ()
sorted ()
liste=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Combien vaut alors liste[4:8] ?
from copy import copy L = [ 1, 2, 3, [4] ] M = copy(L) M[3].append(8) print (L)
[25, 36, 49, 64, 81, 100]
grille= [[1,2,3],[4,5,6],[7,8,9]] print(grille[2][0])
a
a = [1, 2, 7, 8]
a = [1, 2, 3, 4, 5, 6, 7, 8]
liste=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
a=[79] b=[12] c=4*a d=3*b+c
liste = [ "a", "p", "c", "p", "e", "d", "a", "g", "o", "g", "i", "e" ] for i, c in enumerate(liste): print(i,c)
a=[47] b=[80] c=4*a d=4*b+c
['a', 'b', 'c'] ['c', 'a', 'b']
a = [1, 2, 3, 4, 5]
[1, 2, 4, 5]
a = ['a', 'b', 'c']
a=[18, 28] b=[] for i in a: b.append(i+2)
["kiwi","pomme","mangue","poire","orange", "figue"]
L = [ 1, 2, 3, [4] ] M = [0 ,0 ,0 ,0] for i in range( len (L)) : M[ i ] = L[ i ] M[1] = 10 print (L)
Aucun résultat pour cette recherche
Essayez d'autres mots-clés ou vérifiez l'orthographe