while a not in (0, 1, 2, 3):
    print("""Please select one of the following?
Completion = 0
Release ID = 1
Version ID = 2
Build ID = 3
""")
try:
    a = int(eval(input('Please select the type of release required: ')))
except ValueError:
    pass
files(a)
Get a Try statement to loop around until correct value obtained