My code below works perfectly to receive my input data (list.txt) and return lines between 2 and 5 to the screen. 

```
def get_list():

    file = open('list.txt', 'r')
    lines = file.read().splitlines()[2:5]
    print (lines)

get_list()

```

However I am required to implement something where I can call the function like:

```
get_list()[2:5] 

```

and this would print between lines 2 and 5 instead. Can anyone suggest a possible way I can do this? Thanks!