Created
February 7, 2019 06:27
-
-
Save Ventsislav-Yordanov/d3f7ce477cbbc63dc43714c27727f32f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
def get_current_datetime(): | |
""" | |
Returns the current date and current time as a 2-tuple | |
""" | |
current_datetime = datetime.datetime.now() | |
current_date = current_datetime.date() | |
current_time = current_datetime.time() | |
return (current_date, current_time) | |
date, time = get_current_datetime() | |
print(date) | |
print(time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment