[pyar] Quiz
Martin Cerdeira
martincerdeira en gmail.com
Sab Oct 30 13:05:10 ART 2010
On Fri, Oct 29, 2010 at 9:49 PM, Juanjo Conti <jjconti en gmail.com> wrote:
> 2010/10/29 Alejandro Santos <listas en alejolp.com>:
>> [103, 67, 68, 68, 79, 75, 90, 69, 70, 67, 89]
>
> Está duro! no salió con esto:
>
>>>> l = [103, 67, 68, 68, 79, 75, 90, 69, 70, 67, 89]
>>>> for x in range(100):
> ... print "".join([chr(c-x) for c in l])
>
>>>> for x in range(100):
> ... print "".join([chr(c+x) for c in l])
Tampoco salio con esto:
>>>> a = [103, 67, 68, 68, 79, 75, 90, 69, 70, 67, 89]
>>>> e = 0
>>>> for i in a
print chr(i+e)
e += 1
>>>> e = 0
>>>> for i in a
print chr(i-e)
e += 1
O sea, sumarle o restarle la posicion.
-------------------------------------
Martín Cerdeira - Software Developer
[web] http://www.codmacs.blogspot.com/
() ascii ribbon campaign
/\ www.asciiribbon.org
More information about the pyar
mailing list