something like this:
answer={"Y":"Reboot","N":"Reboot cancled"} #use a dictionary instead of if-else
inp=raw_input("Reboot Y/N: ")
while inp not in ('n','N','y','Y') : #use a tuple to specify valid inputs
print "invalid input"
inp=raw_input("Reboot Y/N: ")
print answer[inp.upper()]
output:
$ python so27.py
Reboot Y/N: foo
invalid input
Reboot Y/N: bar
invalid input
Reboot Y/N: y
Reboot