I have a string which is ####I_AM_SAM,. What I want is to use only the text part. So I was trying to use split and split it like this: line = f.readline().split(',' ,' ') where f.readline() reads this " I_AM_SAM,". I expected line[0] to fetch the text, but this gives me an error. Note that there are 4 spaces before the text "I_AM_SAM". I have represented the space bar with a "#" symbol.
line = f.readline().split(',' ,' ')
TypeError: an integer is required
I_AM_SAM,. I want to extract I_AM_SAM