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