Why are values removed from the fields tuple after using the zip() function? How to avoid it?
from openpyxl import load_workbook wb2 = load_workbook('sample.xlsx') ws = wb2.active fields = (cell.value for cell in ws['1']) # Тут есть значения в fields for f in fields: print (f) cellsIter = iter(ws.values) next(cellsIter) for i in cellsIter: for k, v in zip(fields, i): pass # В этом месте уже ничего нет в fields for f in fields: print (f)