min()
numbers = [5, 12, 2, 23, 7]
min_num = min(numbers)
print(min_num) # Вывод: 2words = ["apple", "banana", "cherry", "date"]
min_word = min(words)
print(min_word) # Вывод: "apple"students = [
{"name": "Alice", "age": 20},
{"name": "Bob", "age": 18},
{"name": "Charlie", "age": 22}
]
youngest_student = min(students, key=lambda x: x["age"])
print(youngest_student) # Вывод: {'name': 'Bob', 'age': 18}Последнее обновление