Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add items in list in python

# To add items to a list, we use the '.append' method. Example:
browsers_list = ['Google', 'Brave', 'Edge']
browsers_list.append('Firefox')
print(browsers_list) # Output will be ['Google', 'Brave', 'Edge', 'Firefox']
Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #add #items #list #python
ADD COMMENT
Topic
Name
9+3 =