Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # memes will be numbers in this case
- from random import randint
- from time import sleep
- # set x to "null" so it is defined in memory
- x = "null"
- while True:
- # create a temporary value (meme)
- temp = randint(0,10)
- # check if x is already this value (no change in top meme)
- # if it's NOT, then we assign x as this value
- if temp != x:
- x = temp
- print("x assigned to %s" % (x))
- # then we sleep until loop restarts
- sleep(1800
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement