title: How to check if a string contains only characters from a given set in python
body: <p>I have a a user-inputted polynomial and I only want to use it if it only has characters in the string <code>1234567890^-+x</code>.</p>
  
  <p>How can I check if it does or not without using external packages? I only want to use built-in Python 2.5 functions.</p>
  
  <p>I am writing a program that runs on any Mac without needing external packages.</p>