A list of squares · Список квадратов
A list of squares
Build a list one item at a time instead of printing each value.
squares.append(x) adds x to the end of the list. Printing a whole list shows it in square brackets, with commas between the items.
Список квадратов
Создавайте список по одному элементу, вместо того чтобы выводить каждое значение.
squares.append(x) добавляет x в конец списка. Вывод всего списка показывает его в квадратных скобках с запятыми между элементами.
Start with an empty list, add the squares of 1 to 5 with .append(), then print the list. It should show [1, 4, 9, 16, 25]. · Начните с пустого списка, добавьте квадраты чисел от 1 до 5 с помощью .append(), затем выведите список. Он должен содержать [1, 4, 9, 16, 25].
Click Run to see the output here. · Нажмите Запустить, чтобы увидеть результат здесь.