l1=[]
for a in range(1,10,1):
z=input("Enter names:")
l1.append=(z)
print[l1]
I tried the code. and this error came:
AttributeError: ‘list’ object attribute ‘append’ is read-only
So yeah. anyone can help. please :]
New contributor
Shaurya Pro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2