puis-je le faire dans une boucle, en produisant le nom du fichier à partir du nom du tableau à stocker?obtenir une variable tableau en python
ab = array.array('B', map(operator.xor, a, b))
f1 = open('ab', 'wb')
ab.tofile(f1)
f1.close
ac = array.array('B', map(operator.xor, a, c))
f1 = open('ac', 'wb')
ac.tofile(f1)
f1.close
ad = array.array('B', map(operator.xor, a, d))
f1 = open('ad', 'wb')
ad.tofile(f1)
f1.close
ae = array.array('B', map(operator.xor, a, e))
f1 = open('ae', 'wb')
ae.tofile(f1)
f1.close
af = array.array('B', map(operator.xor, a, f))
f1 = open('af', 'wb')
af.tofile(f1)
f1.close
nous vous remercions de votre aide!
Ils sont dans un dict - il s'appelle * locals() * :) –
@Ian Oui, mais certaines personnes n'aiment pas utiliser cela parce que c'est un peu un hack. –
merci! le fait-il si a, b, c, d, e, f sont aussi des tableaux? – lclevy