New course! Every coder should learn Generative AI!
Try a free lesson0
How to use append function
I am begginer
4 Answers
+ 5
a = [1, 2, 3]
a.append(4)
print(a)
# output
[1, 2, 3, 4]
+ 2
+ 1
It's taught in Lesson 38.1 of the Python for beginners course (for some reason I can't link it here)