I'm quite a beginner, so I'm sorry if this is really dumb.
for i in range(3, 5) + range(5, 7) + range(7, 9) + range(9, sheet.max_column):
I'm working with an excel spreadsheet, this being one of my lines of code, from which the issue is occurring. As you can tell, I am trying to exclude certain columns (4, 5 + 6, 7 + 8, 9) from interfering with each other. When running the program, I get this error message:
Traceback (most recent call last):
File "C:/Users/pc/PycharmProjects/ExcelCalculator/Excel/Test.py", line 5, in <module>
for i in range(3, 5) + range(5, 7) + range(7, 9) + range(9, sheet.max_column):
TypeError: unsupported operand type(s) for +: 'range' and 'range'
It's clear the "+" sign shouldn't be used, so what should be instead?