What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-08 16:36:03
how to separate a string into 2 lists of numbers and letters python
stringtosplit = 'hello75world' letters = [] numbers = [] for k in stringtosplit: if k.isalpha() == True: letters.append(k) elif k.isdigit() == True: numbers.append(k) letters = ''.join(letters) numbers = ''.join(numbers) print(numb... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5