Untitled

mail@pastecode.io avatar
unknown
python
a month ago
365 B
1
Indexable
Never
import random

if __name__ == '__main__':
    numbers = [random.randint(1, 100) for _ in range(10)]

    print(numbers)

    # Sortujemy liste
    numbers.sort()
    print(numbers)

    # Ściągamy ostatni element
    numbers.pop()

    print(numbers)

    # Pobieramy drugi co do wielkości element
    result = numbers.pop()
    print(result)
Leave a Comment