[pyar] [OT] Juego para geeks
Claudio Freire
klaussfreire en gmail.com
Mar Mar 15 10:44:40 ART 2011
2011/3/15 Daniel Moisset <dmoisset en machinalis.com>:
> out[496::5]
Esta notación la rompe.
En python2.x podés usar array
from array import array
out = array('b',' \n'*1000)
out[496::5] = array('b',map(ord,'1'*100+'2'*100+'3'*100+'4'*100+'5'*100+'6'*100+'7'*100+'8'*100+'9'*100+'0'))
out[47::5] = array('b',map(ord,(('1'*10+'2'*10+'3'*10+'4'*10+'5'*10+'6'*10+'7'*10+'8'*10+'9'*10+'0'*10)*10)[:991]))
out[3::5] = array('b',map(ord,(('1234567890')*100)))
out[4995] = ord('1')
print out.tostring()
More information about the pyar
mailing list