I have data in a txt file and I need to separate a sentence from a value. Every line of the txt file has the form <Sentence> <number>. I need to read the value and the sentence in two different columns, but the sentences can contain numbers, dots and every possible stuff since they are just random sentences. The numeric value in question though is always at the end of the line.
For example :
This coffee is bad. -1
How can I do this in Python?
re.