Hi I wrote a program which tells me if there is or not hexadecimals in the input.
hexadecimal = ['0','1','2','3','4','5','6','7','8','9','a','A','b','B','c','C','d','D','e','E','f','F']
output = ''
for c in hexadecimal:
digit = input('Digit: ')
output += c.join(digit)
if digit == '':
print(output, 'is a valid hexadecimal string.')
break
elif digit not in hexadecimal:
print(digit, 'is not a valid hexadecimal digit.')
break
The complete code of this program works, the only problem is that I need to add this into my code when the user doesn't enter anything.