“Python teilte das Wort in Buchstabenpaare auf” Code-Antworten

Python teilte das Wort in Buchstabenpaare auf

string = 'ABCDXY'
[string[i:i+2] for i in xrange(0, len(string), 2)]
Fancy Frog

Python teilte das Wort in Buchstabenpaare auf

s = 'abcdef'
L = zip(s[::2], s[1::2])
# -> [('a', 'b'), ('c', 'd'), ('e', 'f')]
Fancy Frog

Ähnliche Antworten wie “Python teilte das Wort in Buchstabenpaare auf”

Fragen ähnlich wie “Python teilte das Wort in Buchstabenpaare auf”

Weitere verwandte Antworten zu “Python teilte das Wort in Buchstabenpaare auf” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen