title: Python crypt module
body: <p>I was looking up on python modules, when I found something called 'crypt'. I do not understand. I have tried reading up on this, what is this 'salt' thing, what is the use of this crypt module, and is there some sort of way that I can apply 'crypt' to this piece of python code?:</p>
  
  <pre><code>import crypt
  
  max_attempts = 3     
  attempt = 0          
  
  try:
  
  
      while attempt &lt; max_attempts:
  
          uname = input('Username: ')  
          password = input('pass: ')   
  
          if uname == 'admin' and password == 'Khs9':
              print('Welcome Admin')
              break
          else:
              attempt += 1
              if attempt == max_attempts:
                  raise RuntimeError("\nYou've reached the maximum number of attempts allowed.")
  
              else:
                  print('Wrong credentials.\n Try again or press &lt;ctrl+c&gt; to exit.\n')
                  continue
  
  
  except KeyboardInterrupt:
      print('Terminated by the user.\nGood-bye.')
  
  except RuntimeError as e:
      print("Goodbye")
  </code></pre>