You are viewing a single comment's thread. Return to all comments →
When i paste the sample input into the custom input box, some how the "\t" separator is getting lost.
Because of this my input data parsing is not working.
How do I ensure that the "\t" separator in the input data is not lost ?
I had same issue and added this line
if name == 'main':
inputData = 
counter = 0
for line in sys.stdin:
counter += 1
charcount = 0
line.replace(' ','\t',2) #this line
state, city = line.strip().split("\t")
in python 2 and that resolved.
Hope that is helpful
It could be cuz of editor (sublime, atom, gedit etc) spacing while pasting input. I suggest, open input file in vi editor through terminal and erase spacing & provide tab in between state and cities/town.