years = list(range(2001,2003+1)
months = list(range(1,12+1)
I want to get the list as follows which consist all months and all years:
required = ['1.2001', '2.2001', '3.2001'...'12.2001', ....'1.2002', '2.2002', '3.2002'...'12.2002', '1.2003', '2.2003', '3.2003'...'12.2003']
My wrong code, but intended way of coding is below:
required = [x + '.' + (str(y) for y in years) for x in months]
Looking for simplest way of solving it.