Re: [Python] lista di caratteri
[chr(c) for c in range(ord('a'), ord('z'))] una cosa del genere? ciao, Marco Il giorno 20 febbraio 2013 12:04, Dante Dis'Utopia ha scritto: > Salve vorrei riempire una lista con le lettere dell'alfabeto, un po alla > maniera del c, ossia con un ciclo for pensando i caratteri a livello ascii. > Come posso fare??? > > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
Forse ord('z')+1 per arrivare all'ultima..:-) Ciao :-) --Luca On Feb 20, 2013 12:09 PM, "Marco De Paoli" wrote: > [chr(c) for c in range(ord('a'), ord('z'))] > > una cosa del genere? > > ciao, > Marco > > Il giorno 20 febbraio 2013 12:04, Dante Dis'Utopia > ha scritto: > >> Salve vorrei riempire una lista con le lettere dell'alfabeto, un po alla >> maniera del c, ossia con un ciclo for pensando i caratteri a livello ascii. >> Come posso fare??? >> >> ___ >> Python mailing list >> Python@lists.python.it >> http://lists.python.it/mailman/listinfo/python >> >> > > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
Il giorno 20 febbraio 2013 12:17, Luca Melandri ha scritto: > Forse ord('z')+1 per arrivare all'ultima..:-) > ye (... acc, non avevo fatto il test case :-) ciao Marco ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
Beh resta comunque un'ottima risposta :-) Ciao :-) --Luca On Feb 20, 2013 12:20 PM, "Marco De Paoli" wrote: > > > Il giorno 20 febbraio 2013 12:17, Luca Melandri ha > scritto: > >> Forse ord('z')+1 per arrivare all'ultima..:-) >> > ye (... acc, non avevo fatto il test case :-) > > ciao > Marco > > > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
Grazie, perfetto! Il giorno 20 febbraio 2013 12:19, Marco De Paoli ha scritto: > > > Il giorno 20 febbraio 2013 12:17, Luca Melandri ha > scritto: > > Forse ord('z')+1 per arrivare all'ultima..:-) >> > ye (... acc, non avevo fatto il test case :-) > > ciao > Marco > > > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
Il 20 febbraio 2013 12:25, Dante Dis'Utopia ha scritto: > Grazie, perfetto! O anche >>> import string >>> list(string.lowercase) ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] © -- R K--S L ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
string.ascii_lowercase nel caso usi il 3.3 Ciao :-) --Luca On Feb 20, 2013 12:28 PM, "Carlo Miron" wrote: > Il 20 febbraio 2013 12:25, Dante Dis'Utopia ha > scritto: > > Grazie, perfetto! > > O anche > > >>> import string > >>> list(string.lowercase) > ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', > 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] > > © > -- > R > K--S > L > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] lista di caratteri
Good! Il giorno 20 febbraio 2013 12:38, Luca Melandri ha scritto: > string.ascii_lowercase nel caso usi il 3.3 > Ciao :-) > --Luca > On Feb 20, 2013 12:28 PM, "Carlo Miron" wrote: > >> Il 20 febbraio 2013 12:25, Dante Dis'Utopia ha >> scritto: >> > Grazie, perfetto! >> >> O anche >> >> >>> import string >> >>> list(string.lowercase) >> ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', >> 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] >> >> © >> -- >> R >> K--S >> L >> ___ >> Python mailing list >> Python@lists.python.it >> http://lists.python.it/mailman/listinfo/python >> > > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python