I would like to get the current time in Python and assign them into variables like year, month, day, hour, minute>
year
month
day
hour
minute>
By unpacking timetuple of datetime object, you should get what you want:
timetuple
from datetime import datetime n = datetime.now() t = n.timetuple() y, m, d, h, min, sec, wd, yd, i = t