Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add a new element to a list in python

#!/usr/bin/env python

# simple.py

nums = [1, 2, 3, 4, 5]

nums.append(6)
Source by zetcode.com #
 
PREVIOUS NEXT
Tagged: #add #element #list #python
ADD COMMENT
Topic
Name
8+6 =