Skip to content

How to add a value to a list in Python?

#append to list
lst = [1, 2, 3]
something = 4
#lst is now [1, 2, 3, 4]
See also  CSS code snippet - How to get rid of button outline when clicked?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.