PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
players = ["Alice", "Bob", "Charlie", "David", "Eve", "Frank"]
#Create 3 lists with 2 players each
#Use slicing to create a list for Group 1
g1 = players[:2]
#Use slicing to create a list for Group 2
g2 = players[2:4]
#Use slicing to create a list for Group 3
g3 = players[4:6]
print("Group 1:")
#display the 1st group
print(g1)
#there see, as intended.⬆️⬆️⬆️
print("Group 2:", g2)
#display the 2nd group
print("Group 3:", g3)
#display the 3rd group
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run