...

/

Solution Review: From List to Tuple

Solution Review: From List to Tuple

Review the solution for the "From List to Tuple" exercise.

We'll cover the following...

Solution

Let’s explore the solution of from list to tuple.

Press + to interact
my_list = [34, 82.6, "Darth Vader", 17, "Hannibal"]
my_tuple = (my_list[0], my_list[len(my_list) - 1], len(my_list))
print(my_tuple)

Explanation

Here’s a ...