How to append to a list in Python

Posted on: January 31st, 2023
By: Tadeo Martinez

Here’s a good article on it:

https://www.programiz.com/python-programming/methods/list/append

countries = ['Honduras', 'Guatemala', 'Nicaragua']

# append 'Yen' to the list
countries.append('Panama')

print(countries)

# Output: ['Honduras', 'Guatemala', 'Nicaragua', 'Panama']

Have any questions or comments? Write them below!


Leave a Reply

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