字符串长字符串
date2check = to_datetime(str(last_tx.year) + \
'-' + str(int(last_tx.month)-3) + \
'-' + str(last_tx.day) + \
' ' + str(last_tx.hour) + \
':' + str(last_tx.minute) + \
':' + str(last_tx.second))
作品没有问题,但我想知道是否有某种方式的漂亮格式的更多appropiately重新写这个(在Python的方式)。 last_tx
是一个日期时间对象。
[这里是一个类似的帖子](http://stackoverflow.com/questions/4172448/is-it-possible-to-break-a-long-line-to-multiple-lines-in-python#4172465)这应该有所帮助。基本上你可以用反斜线来换行。 –