title: Check if a string contains only given characters
body: <p>I'm wondering if there is more elegant way to check if the string (str = 'abcccbbaabcbca') contains only 'a','b' or 'c' than iterating over it :</p>
  
  <pre><code>for i in str:
     if i in ['a','b','c']:
        pass
     else :
        print('wrong character')
  </code></pre>