title: Check if the python string contains specific characters
body: <p>I have to write a program that prompts user for input and  should print True only if every character in string entered by the user is either a digit ('0' - '9') or one of the first six letters in the alphabet ('A' - 'F'). Otherwise the program should print False.</p>
  
  <p>I can't use regex for this question as it is not taught yet, i wanted to use basic boolean operations . This is the code I have so far, but it also outputs ABCH as true because of Or's. I am stuck</p>
  
  <pre class="lang-py prettyprint-override"><code>string = input("Please enter your string: ")
  
  output = string.isdigit() or ('A' in string or 'B' or string or 'C' in string or 'D' in string or 'E' in string or 'F' in string)
  
  print(output)
  </code></pre>
  
  <p>Also i am not sure if my program should treat lowercase letters and uppercase letters as different, also does string here means one word or a sentence?</p>