How do I get and print the current time in Python?
I'm following this Tutorial and want to print the current time in my python script. I can not reproduce what is thought in the toturial. The current time is not printed.
Here is my current code for the Python script:
main.py:
def printTime():
print("The time is"+time+"right now");
printTime();
I want to achieve is
- That the time variable is a variable that equals the current time
- To find a way to get the current time printed