datetime.__str__()

For a datetime instance d, str(d) is equivalent to d.isoformat(' ').

Related Reading

datetime — Basic date and time types