title: Python script does not work but gives no error message
body: <p>I am new to programming/scripting in general and just becoming to understand the basics of the workings of python2.7. Anyways, i have here a script i have been working on to randomly generate a password made up of letters, numbers and special characters.</p>
  
  <pre><code>import random
  
  charset="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  charset+=charset.lower()   # adds lowercase a-z to charset
  charset+="@&amp;%_$#" # adds these special characters to the charset
  charset+="1234567890" # adds digits 0-9 to charset
  
  def generate_password(length):
    """generates random password"""
      password=[]
      for n in range(length):
          password.append(random.choice(charset))
          print password
      return password
  
  def main():
      # test cases
      length = 4
  
    # boilerplate 
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>Please excuse if this seems like a stupid question but i am new to this after all :(. When i run the above script i receive no output as well as no error message resulting in me not knowing what the heck im doing wrong!</p>