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>
you can use datetime module to get current Date and Time in Python 2.7
import datetime print datetime.datetime.now()
Output :
2015-05-06 14:44:14.369392