Slip 28 - B) Write a Python program to accept two lists and merge the two lists into list of tuple.

 Solution:

lst1=[1,2,3,5]
lst2=["Coding Activity"]

t3=list()
t3.append(lst1)
t3.append(lst2)

t4=[tuple(t3[0]),tuple(t3[1])]
print(t4)


Output:

Output_pic


Post a Comment

0 Comments