So I am trying to make this code run in a constant loop. Any ideas how I would do this? As I said before I am trying to self teach myself Python and so far I have been successful.
import os import datetime import time print('What would you like to do?') answer = raw_input() today = datetime.date.today() if answer == 'shutdown': print('This works') elif answer == 'restart': print('This also does work') elif answer == 'restart': print('This also works fine') elif answer == 'date': print today elif answer == 'time': print (time.strftime("%H:%M:%S")) else: print('Did not recognize that request, sorry.')