def tail(path): #with open('fffs',encoding='utf-8') as f: f = open(path,encoding='utf-8') while True: line = f.readline() if line.strip(): yield line.strip() g = tail('fffs') for i in g: print('sssss',i)
def tail(path): #with open('fffs',encoding='utf-8') as f: f = open(path,encoding='utf-8') while True: line = f.readline() if line.strip(): yield line.strip() g = tail('fffs') for i in g: print('sssss',i)