Create a tuple from an input in Python

input, python, python-3.x, tuples

Solution

You could do something like

a = tuple(int(x) for x in a.split(","))

Problem

Here is my example: ``` >>> a=input ('some text : ') # value entered is 1,1 >>> print (a) 1,1 ``` I want as a result a tuple (1, 1) How can I do this?

Original source

Related problems