import yaml with open("a.yaml") as f: with open("a.yaml") as k: while(1): x=f.readline() if(x): if(x==k.readline()): pass else: print("not equal") else: print("end!") break
import yaml with open("a.yaml") as f: with open("a.yaml") as k: while(1): x=f.readline() if(x): if(x==k.readline()): pass else: print("not equal") else: print("end!") break
转载于:https://www.cnblogs.com/sea-stream/p/10362973.html