Write a Python program that uses the datetime module to display the current date and time. Return the current date and time.
Example:
Input: None
Output: Current date and time
Use the datetime function from the datetime module.
import datetime
def get_current_datetime():
return datetime.datetime.now()
# Test the function
print(get_current_datetime()) # Output: Current date and time
print(get_current_datetime()) # Output: Current date and time
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.