Write a Python program to demonstrate working of Convert List to Single valued Lists in Tuple


Topic: Write a Python program to demonstrate working of Convert List to Single valued Lists in Tuple

Solution

test_list = [6, 8, 4, 9, 10, 2] 
print(f"The original list is : {test_list}") 
res = tuple([ele] for ele in test_list)  
print(f"Tuple after conversion : {res}") 



List all Python Programs