title: creating a function like isdigit() in python
body: <p>Please don't give me the answer just point me in the right direction, thank you. Also, I need to do this without <code>isdigit()</code>.</p>
  
  <p>I am trying to create a program that checks all the characters of a string and if any of them are not natural numbers then the program will return <code>False</code> otherwise it will return <code>True</code>.</p>
  
  <p>This is what i have so far:</p>
  
  <pre><code>numbers = ["0123456789"]
  
  if len(str) &gt; 0:
      for i in str:
          if i not in numbers:
              return False
          else:
              return True
  </code></pre>
  
  <p>I have a few test cases and the problem I'm having is that when I return, the whole program just ends. I need to find a way to include the <code>else: return True</code></p>