How to convert elements(string) to integer in tuple in Python
You can use map.
myinput = "2 3"
mytuple = tuple(map(int, myinput.split(' ')))
This seems to be a more readable way to convert a string to a tuple of integers. We use list comprehension.
myinput = "2 3 4"
mytuple = tuple(int(el) for el in myinput.split(' '))