我需要比较 2 个相似模式的表并有 2 个生成器对象。我如何在 Python 中逐行比较这 2 个生成器。需要实现文件比较逻辑,
If generator-object-1 = generator-object-1:
then read-next-row-generator-object-1,read-next-row-generator-object-1
elif generator-object-1 > generator-object-2:
then read-next-row-generator-object-2
elif generator-object-1 < generator-object-2
then read-next-row-generator-object-1
在 Python 中有没有更好的方法?