title: Getting module object is not callable when importing random into a function
body: <p>Making a script as a project for my manager and getting an error on line 16 when trying to import random into the function and getting the module object is not callable on that line. Here is the code.</p>
  <pre><code>import time
  
  import random
  
  list1 = ['A', 'B', 'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&amp;','*','(',')','-','_','=','+']
  
  password = input('Enter a three character password')
  
  guess = 0
  
  while password != input:
  
  import random
  print('Loading, this is a test')
  rannum = random('1','2','3')
  if rannum == 1:
      ran1 = random.sample(list1)
      guess = ran1
      print(guess)
  elif rannum == 2:
      ran1 = random.sample(list1)
      ran2 = random.sample(list1)
      guess = ran1 + ran2
      print(guess)
  elif rannum == 3:
      ran1 = random.sample(list1)
      ran2 = random.sample(list1)
      ran3 = random.sample(list1)
      guess = ran1 + ran2 + ran3
      print(guess)
  </code></pre>
  <p>EDIT: I was able to clean the code up a decent amount to this:</p>
  <pre><code>import time
  import random
  
  list1 = ['A' , 'B', 'C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','&amp;','*','(',')','-','_','=','+']
  
  password = input('Enter a three character password')
  
  guess = 0
  
  while guess != password:
      rannum = random.randrange(1,4)
      guess = random.sample(list1, k =rannum)
      print(guess)
  </code></pre>
  <p>However whenever it prints it comes out looking like ['x' , 'v' , '1'] for example. Any idea on how to make it come out looking cleaner? So instead of that it would just come out like xv1?</p>