title: How to check that a string contains only “a-z”, “A-Z” and “0-9” characters
body: <p>I am importing string and trying to check if text contains only "a-z", "A-Z", and "0-9".</p>
  
  <p>But I get only input and it doesn't print success when I enter letters and digits</p>
  
  <pre><code>import string
  text=input("Enter: ")
  correct = string.ascii_letters + string.digits
  if text in correct:
      print("Success")
  </code></pre>