I have been working with some Python imaging libraries lately and i have been getting issues extracting the text from the last three lines of a string.
Lets say I have a string
a = '''
Human
Dog
Cat
Banana
Apple
Orange'''
And i want to convert the stuff into 2 different lists, one of which has the last three lines of the string, the other of which has all the rest of the lines of the string.
first_items = ['Human', 'Dog', 'Cat']
last_items = ['Banana', 'Apple', 'Orange']
How do I do this in Python?