Skip to content

Instantly share code, notes, and snippets.

@ohseojay
Created September 8, 2019 01:46
Show Gist options
  • Save ohseojay/0ab4aaa0c96fbbc48ed30ad2a5a5e8f5 to your computer and use it in GitHub Desktop.
Save ohseojay/0ab4aaa0c96fbbc48ed30ad2a5a5e8f5 to your computer and use it in GitHub Desktop.
Can you help with this? I runed this on pycharm and any word like"hello" as an input still works as current dt
import datetime
var = input("hello:")
if var == "time" or"What's the time" or "What's the time?" or"What is the time" or "Whatis the time?":
currentDT = datetime.datetime.now()
print("It is " + str(currentDT))
else:print("Sorry", I couldn't get that.")
@ohseojay
Copy link
Author

ohseojay commented Sep 8, 2019

Can you comment what is the problem?
And I ran with pycharm comunity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment