How to set a variable, that isnt iter variable, to increases in each iteration and doesnt always return to its value prior to its entry into for loop?
How to set a variable, that isnt iter variable, to increases in each iteration and doesnt always return to its value prior to its entry into for loop? Question: import re, datetime def add_months(datestr, months): ref_year, ref_month = "", "" ref_year_is_leap_year = False aux_date = str(datetime.datetime.strptime(datestr, "%Y-%m-%d")) print(repr(aux_date)) for i_month in range(int(months)): # I add …