Hi, I am a beginner level programmer and in one assignment the question
given is:to remove ',' from a list after getting a comma separated input
from console.

I gave the below (most print statements are for reference except the last
print statement). but i get the attached error. can someone explain why
this error nd how to rectify?

inputdata = input ('Enter comma separated data \n')
type(inputdata)
inputlist = list(inputdata)
print(inputlist)
a = len(inputdata)
print(a)
print ('xxxxxxxxxxxxxxxx')
for b in range(0,a):
    print(a)
    a = a - 1
    print(inputlist)
    inputlist.remove(',')
print(inputlist)




Thanks,
Vinod
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to