def tail(filename):#函数 f = open(filename,encoding='utf-8') while True: line = f.readline() if line.strip(): yield line.strip() g = tail('file')#引用 设置文件名为 file for i in g: #使用生成器监听 if 'python' in i: print('***',i)
<div id="addNumber"> <p>How many people would you like to invite?</p> <input id="numPeople" type="number" min="0" value="" placeholder="0" /> </div> <div id="