I want to write a function to process some data I bring from Excel. The data is essentially in an Excel column (transaction IDs). For reasons of my own convenience, I thought I'd use raw_input with copy-pasting the column from Excel, store it and run the function on that.
However, whatever I do I get errors (I actually got stuck in this very first stage of bringing in the data), and I'm pretty sure the reason is because each item is in a new line (when I use Excel's option to transpose the column to a row, I get no errors).
So, for instance, if I wanted to try and set a sample string to work with, e.g.:
some_string = "014300071432Gre
014300054037Col
014300065692ASC"
(this is the formatting you get when pasting from a column in Excel), and just call some_string, I'd get:
File "<stdin>", line 1
al = "014300071432Gre
^
SyntaxError: EOL while scanning string literal
I tried removing the line-breaks with .split() but that didn't work
I also tried the triple quotes I saw suggested in several threads, but that didn't work either. It only got me more confused because I thought triple quotes are used when you don't want python to evaluate something.
I've placed some Sample Data in a Google doc.
Would really appreciate any help. Thanks!