head, *tail = [1, 2, 3, 4, 5]
print(head)
print(tail)
x, y = (5, 11)
people = [
("James", 42, "M"),
("Bob", 24, "M"),
("Ana", 32, "F")
]
for name, age, gender in people:
print(f"Name: {name}, Age: {age}, Profession: {gender}")
person = ("Bob", 42, "Mechanic")
name, _, profession = person
head, *tail = [1, 2, 3, 4, 5]
print(head)
print(tail)
*head, tail = [1, 2, 3, 4, 5]
print(head)
print(tail)
head, *middle, tail = [1, 2, 3, 4, 5]
print(head)
print(middle)
print(tail)
head, *_, tail = [1, 2, 3, 4, 5]
print(head, tail)
from operator import itemgetter
params = {'a': 1, 'b': 2, 'c': 3}
a, c = itemgetter('a', 'c')(params)
print(a, c)
example_list = ["A", "B", "C"]
for counter, letter in enumerate(example_list):
print(counter, letter)