sample_list = ['Compile', 'With', 'Favtutor']
#convert list into tuple
tuple1 = tuple(sample_list)
print(tuple1)
print(type(tuple1))
the_list = [1, 'a', 2.7]
the_tuple = tuple(the_list)
>>> source_list = [('1','a'),('2','b'),('3','c'),('4','d')]
>>> list1, list2 = zip(*source_list)
>>> list1
('1', '2', '3', '4')
>>> list2
('a', 'b', 'c', 'd')
x = list(x)
sample_list = ['Compile', 'With', 'Favtutor']
#unpack list items and form tuple
tuple1 = (*sample_list,)
print(tuple1)
print(type(tuple1))
tuple_name=tuple(list_name)
>>> l = ['my', 'name', 'is', 'mr', 'list']
>>> l
['my', 'name', 'is', 'mr', 'list']
>>> tuple(l)
('my', 'name', 'is', 'mr', 'list')