Source Code:
(back to article)
# Sample list my_list = [1, 2, 3, 4] # Convert list to tuple my_tuple = tuple(my_list) print(my_tuple) # Output: (1, 2, 3, 4)
Result:
Report an issue