My output from a function are all values that are broken on separate lines, I would like to turn this into a list.
The Score
Leon the Professional
Iron Man
I want to turn this into a list like:
movies= ['The Score', 'Leon the Professional', 'Iron Man']
How can I go about doing this?
Assuming your input is a string.
More information on the splitlines() function.