push element python code example
Example 1: append item to array python
data = []
data.append("Item")
print(data)
Example 2: 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)