The tuple function takes one sequence argument and converts it to a tuple : Convert to Tuple « Tuple « Python Tutorial






print tuple([1, 2, 3])
print tuple('abc')
print tuple((1, 2, 3))








6.5.Convert to Tuple
6.5.1.The tuple function takes one sequence argument and converts it to a tuple
6.5.2.List to tuple
6.5.3.list() and tuple()