Skip to content

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.

Log in or create account

IGCSE, A-Level & AP