Answers for "split string for integers python"

1

split string and convert to int python

a, b = tuple(int(x) for x in '1 2'.split())
Posted by: Guest on October-08-2020
0

how to split python string into N numbers equally

import textwrap
print(textwrap.wrap("123456789", 2))
#prints ['12', '34', '56', '78', '9']
Posted by: Guest on September-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language