DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Date & Time — Example 168

Quick explanation + ready code for: Date & Time.

Python Date & Time Back to examples
Back to language
Syntax: Date & Time in Python. ID: #168

Code

from datetime import datetime
print(datetime.utcnow().isoformat() + "Z")

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.