how to split string into int array in pytho code example Example: split string and convert to int python a, b = tuple(int(x) for x in '1 2'.split())