PLS help me WITH this loop
Posted: Thu Jul 16, 2020 2:00 am
Code: Select all
import datetime
x = datetime.datetime.now()
time=x
if x == "2020-11-02 8:00:00.000000":
print('pi')
else:
print('not the right day')A small, affordable computer with free resources to help people learn, make things, and have fun
https://www.raspberrypi.org/forums/
https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=280155
Code: Select all
import datetime
x = datetime.datetime.now()
time=x
if x == "2020-11-02 8:00:00.000000":
print('pi')
else:
print('not the right day')spegy wrote: ↑Thu Jul 16, 2020 2:00 ampls help me loop this. the loop would need to occur whenever it is not the right time so the loop would have to be in else when it is not the right time so it just keeps repeating itself until it is the right timeCode: Select all
import datetime x = datetime.datetime.now() time=x if x == "2020-11-02 8:00:00.000000": print('pi') else: print('not the right day')
Code: Select all
pydoc3 range
pydoc3 datetime
pydoc3 datetime.date.__sub__
pydoc3 for
pydoc3 time.sleep