from time import *
userinput = raw_input("enter your time(s,m,h): ")
def timehms(s):
result=0
s= list(s)
for item in s:
if "h" in s:
s.remove("h")
result = "".join(s)
result = int(result)*3600
if "m" in s:
s.remove("m")
result = "".join(s)
result = int(result)*60
if "s" in s:
s.remove("s")
result = "".join(s)
result = int(result)
print(result)
return result
yossef = timehms(userinput)
def sleepy(x):
return sleep(x)
sleepy(yossef)
look guys i know it is not super but i will modify it later i am just showing you this and i hope it helps
this function delays(sleeps) the program execution