...

/

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.

Python 3.10.4
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 ...