I'm newbie to programming and in Python as well.
I wrote a function that implements the unix's tail:
def tail(file):
strin = open(file, 'r')
lis = strin.readlines()
lastline = lis[-1]
return lastline
strin.close()
But I think that it is not optimal in performance.
How can I improve?