Wie teilt eine Zeichenfolge in Zeichen in python?

Ich weiß, dass:

print(list('Hello'))

drucken

['H', 'e', 'l', 'l', 'o']

und ich weiß, dass

print(list('Hello world!'))

drucken

['Hello', 'world!']

Welche syntax wäre am einfachsten zu bekommen:

['H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '!']
InformationsquelleAutor Shoryu | 2014-09-06
Schreibe einen Kommentar