Tuples Lists Sets Worksheet
Tuples Lists Sets Worksheet
Section 1: Tuples
2. Access the 2nd and 4th elements from the tuple (10, 20, 30, 40, 50).
4. Count how many times the number 3 appears in the tuple (1, 3, 3, 7, 8).
6. Create a tuple with different data types: an integer, a string, and a float.
Section 2: Lists
1. Create a list with the values [10, 20, 30, 40, 50]. Print it.
2. Append the value 60 to the list and print the updated list.
9. Create a list with repeated elements and use `.count()` to count a value.
Section 3: Sets
10. Create a set from a string and observe what happens (e.g., set("hello")).