Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Call functon 'f' with numerical a numerical argument 't'. The program will run for 't' seconds and output any palindromic numbers it calculates.
- Created by MRH3ADSH0T
- """
- from timeit import default_timer as dt
- def f(t):
- x=0
- st=dt()
- while (dt()-st<=t):
- if (str(x)[::-1] == str(x)):
- print("Palindrome: "+str(x))
- else:
- #print(x)
- pass
- x+=1
- f(2.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement