I'm new at stackoverflow and learning python now. I have a question and searched for it everywhere but couldn't find anything suits my idea.
So the problem is I want to check if an input (or variable) is a letter or a word or contains any letters. For an example, if the variable or respond of input is a it will return False but if the respond or variable is made of just numbers it will respond True.
I really am new in python and don't know so much commands so if there is an existing command (Or tag) which is doing just my work pls don't blame me! Thx by now and here is the code I wanted to test if the input is a letter because it was going to give an error if a letter put in.
import random
import time
repeat= True
none="none"
shutdowntime=3
repeatshut=True
def roll(count):
print ">Rolls are these:"
while count>0:
print random.randint(1,6)
count-=1
while repeat==True:
count=input("=>How many rolls do you want to roll?")
if count!=none:
roll(count)
else:
repeat=False
if repeat==False:
print "=>Thank you for using my dice roll."
while repeat==False and repeatshut==True:
print "%d seconds to shut down." % (shutdowntime)
shutdowntime-=1
time.sleep(1)
if shutdowntime==0:
repeatshut=False
print "Shutting down..."
time.sleep(2)
print "Bye!"