title: Get each item from list to check if it is in password, but without for loop
body: <p>I want to make a password validator. When a user types a password, it will check for some special characters and numbers and length.</p>
  <p>Conditions:</p>
  <ol>
  <li>At least 1 letter between [a-z] and 1 letter between [A-Z].</li>
  <li>At least 1 number between [0-9].</li>
  <li>At least 1 character from [$#@].</li>
  <li>Minimum length 6 characters.</li>
  <li>Maximum length 16 characters.</li>
  </ol>
  <p>My code:</p>
  <pre class="lang-py prettyprint-override"><code>special_char = ['$', '#', '&amp;', '@', '!']
  nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
  
  print('Type a new password:-')
  password = input('Password: ')
  
  if len(password) &gt; 5 and len(password) &lt; 16:
    if special_char in password:
      if nums in password:
        print('Your password is strong enough.')
  </code></pre>
  <p>Output and Error:</p>
  <pre class="lang-py prettyprint-override"><code>Type a new password:-
  Password:  arya90#se
  
  Traceback (most recent call last):
    File &quot;/tmp/sessions/52d06fa3d8741730/main.py&quot;, line 8, in &lt;module&gt;
      if special_char in password:
  TypeError: 'in &lt;string&gt;' requires string as left operand, not list
  </code></pre>
  <p>My questions:</p>
  <ol>
  <li>What do I do to check if there are numbers and special characters in the password? The numbers and special characters should be from that list.</li>
  <li>What is the shortest way to check the password is valid or not? Means how to find if there are any special characters in the password or not? Even if it is not in the list?</li>
  </ol>
  <p>Last condition:</p>
  <p>I want just simple python code, with <code>if</code> <code>else</code> statements, etc. I don't want any modules like random regex or math.</p>