def CreateList(list):
choice=1
while(choice!=0):
choice=input(print('enter choice \n 0 to stop adding elements to list \n 1 to add element to list : \n'))
if(choice==1):
list.append(print('enter element to add to the list : '))
return list
print('list before :', list)
list=CreateList(list)
print('list after : ',list)