This tuple()
function is a sequence constructor which returns a tuple i.e. it creates a tuple.
tuple(iterable)
Here,
tuple()
>>> tuple((1, 2))
(1, 2)
>>> tuple('foo')
('f', 'o', 'o')
>>> tuple((1, 2))
(1, 2)
>>> tuple({1, 2})
(1, 2)
>>> tuple({'a':1, 'b':2})
('a', 'b')
>>> tuple([1, 2])
(1, 2)
>>> tuple()
()
>>> tuple(iter([1, 2]))
(1, 2)