1sample_list = ['Compile', 'With', 'Favtutor']
2
3#convert list into tuple
4tuple1 = tuple(sample_list)
5
6print(tuple1)
7print(type(tuple1))
8
1#!/usr/bin/python
2
3aTuple = (123, 'xyz', 'zara', 'abc');
4aList = list(aTuple)
5print "List elements : ", aList
1>>> source_list = [('1','a'),('2','b'),('3','c'),('4','d')]
2>>> list1, list2 = zip(*source_list)
3>>> list1
4('1', '2', '3', '4')
5>>> list2
6('a', 'b', 'c', 'd')
7
1sample_list = ['Compile', 'With', 'Favtutor']
2
3#unpack list items and form tuple
4tuple1 = (*sample_list,)
5
6print(tuple1)
7print(type(tuple1))
8