List Methods Adventure Worksheet
Every action uses one list to modify the other!
● STEP 1 — Create Your Starting Lists
Create two lists of strings, any theme you like.
Example themes: foods, video games, musicians, superheroes, animals.
list1 = [ ______________________________________ ]
list2 = [ ______________________________________ ]
● STEP 2 — Random Number #1 (1–10)
import random
num = random.randint(1, 10)
print(num)
If 1–5, follow Path A
If 6–10, follow Path B
● Path A (num 1–5): Use list2 to modify list1
1. Append the item at index 0 of list2 to list1.
New item added: _______________________
2. Insert the last item of list2 at index 1 of list1.
Inserted item: ________________________
3. Sort list1 alphabetically.
4. Write the updated list:
● Path B (num 6–10): Use list1 to modify list2
1. Append the item at index 0 of list1 to list2.
New item added: _______________________
2. Insert the last item of list1 at index 2 of list2.
Inserted item: ________________________
3. Sort list2 alphabetically.
4. Write the updated list:
● STEP 3 — Random Number #2 (1–10)
Run again:
num = random.randint(1, 10)
print(num)
If even, follow Path C
If odd, follow Path D
● Path C (even number): pop from list1 → append
to list2
1. Find the middle index of list1:
Middle index: _____
2. Pop that item from list1:
Item popped: ________________________
3. Append the popped item to list2:
4. Write updated lists:
● Path D (odd number): pop from list2 → insert
into list1
1. Pop the item at index 0 of list2:
Item popped: ________________________
2. Insert that item at the end of list1:
Write updated lists:
● STEP 4 — Random Number #3 (1–10)
Run again:
num = random.randint(1, 10)
print(num)
Follow the instructions:
If num ≤ 3, use Case 1
If 4–7, use Case 2
If 8–10, use Case 3
● Case 1 (num ≤ 3): remove() using the opposite
list
1. Choose an item from list1 that also appears in list2,
or vice versa.
2. Remove it using:
Item removed: _____________________
List updated: _____________________
● Case 2 (num 4–7): index() from one list used to
modify the other
1. Pick an item from list1 and find its index in list1:
Item: ________________
Index found: __________
2. Insert that index as a string into list2 at the end:
3. Updated list2:
● Case 3 (num 8–10): count() from one list used on
the other
1. Pick an item from list2 and count how many times it appears in list2:
Item: ________________
Count: _______________
2. Insert that count into index 0 of list1:
Updated list1:
● STEP 5 — Final Lists
Final list1 =
___________________________________________
Final list2 =
___________________________________________