I have a two requirements .
First Requirement-I want to read the last line of a file and assign the last value to a variable in python.
Example from https://docs.python.org/3/library/collections.html
from collections import deque def tail(filename, n=10): 'Return the last n lines of a file' with open(filename) as f: return deque(f, n)