+ 1
Take 2 letters in python
I was making a project, and I came across an unsolved problem. So for example I have a string: this is book. Then how to make the string into a list like this: ["th", "is", "is", "bo", "ok"] Also see that spaces are removed
1 Antwort
+ 2
string ="".join(input().split(' '))
string = [string[i:i+2] for i in range(0,len(string),2)]
print(string)