On 07/02/18 11:58, vinod bhaskaran wrote:
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
The attachment doesn't get through to this text only list so please cut and paste the entire traceback into a reply, thanks.
-- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
