Codice Gray: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Riga 153:
Esempio d'uso dalla shell Python:
<pre>
»>>> bins = ['000', '001', '010', '011', '100', '101', '110', '111']
»>>> grays = [tograystr(b) for b in bins]
»>>> grays
['000', '001', '011', '010', '110', '111', '101', '100']
»>>> [tobinarystr(g) for g in grays]
['000', '001', '010', '011', '100', '101', '110', '111']
</pre>