I build this simple function, trying to use PEP 8 Style, something that I discovered recently thanks to this previous question.
The function works, but I was wondering if:
There is a better way to do it
Description and other stuff are correct
import datetime def quarter_values_builder(): """A function that returns an array with all the actual year quarters """ now = datetime.datetime.now() year = now.year year_str = str(year) quarter_values = ("31/03/","30/06/","30/09/","31/12/") quarter_values_now = (x+year_str for x in quarter_values) return quarter_values_now current_quarters_string = quarter_values_builder() print(current_quarters_string)