+ 1

get a tuple as input

hi everyone have anice codetime im after a way to get a tuple as an input from user such as what we had in str or lists tnx everyone

5th Jan 2018, 10:51 PM
Rasoul
Rasoul - avatar
1 Answer
+ 1
var = input() listVar = var.split() tupVar = tuple(listVar) maybe easier way. I am still learning also. var = tuple(input()) print(var) works also but it splits the letters.
5th Jan 2018, 11:06 PM
emmey
emmey - avatar