assign element to list python code example Example: add an element to list python a=[8,5,6,1,7] a.append(9)