How to print the current date and time in Python

Here is the code to print the current date and time in Python

from datetime import datetime
print datetime.now().strftime('%Y-%m-%d %H:%M:%S')

My Thought

Your email address will not be published. Required fields are marked *

Our Tool : hike percentage calculator