def yesterday():
 date = datetime.datetime.now()
 date -= datetime.timedelta(days=1)
 date_tuple = date.timetuple()[:6]
 return date_tuple

def yesterday ( ) : date = datetime . datetime . now ( ) date -= datetime . timedelta ( days = 1 ) date_tuple = date . timetuple ( ) [ : 6 ] return date_tuple
get yesterdays datetime as a 5-tuple .