title: Check if string has numbers, letters and spaces
body: <p>I'm trying to come up with an assert statement that checks whether a nonempty string, s, contains alphanumeric characters and spaces:</p>
  
  <pre><code>    assert s.isalnum()
  </code></pre>
  
  <p>I understand that this will return False if there are spaces because it checks that whether every character is either a letter or number.  How do I fix this?</p>
  
  <p>EDIT: For clarification, I'm trying to create an assert statement that checks whether a nonempty string contains alphanumeric characters and/or spaces.  For example, "    a 4    bc  " and "ab" should both return True.</p>