title: Python 3: Removing brackets from a list
body: <p>Im trying to remove brackets from a list array, but its not working, heres my code.</p>
  
  <pre><code>#user input for amount of directories
  ask_total_dirs = 100
  
  #begin calculation
  num_files = 10 #sets how many files per directory
  total_files = int((ask_total_dirs * num_files)) #finds total amount of files
  #print (total_files)
  
  phone_num = 50000 #total number of phone numbers per file
  total_phone_num = (total_files * phone_num) #total number of phone numbers
  #print (total_phone_num)
  #end calculation
  
  #begin generator code
  def area_code():
      area = [random.randint(1,10) for _ in range(3)] #set for area code
      list_area = str(list(area))
      multiply = str(list_area * total_files) #all amount of area codes needed
      nospace = ( ", ".join( repr(e) for e in multiply ) )
      print (nospace)
  
  area_code()
  #end generator code
  </code></pre>
  
  <p>I get the output of...</p>
  
  <pre><code>'[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']', '[', '5', ',', ' ', '2', ',', ' ', '8', ']'
  </code></pre>
  
  <p>I have also tried this code but I get the same output.</p>
  
  <pre><code>nospace = "".join(multiply)
  </code></pre>
  
  <p>any help is appreciated</p>
  
  <p>EDIT</p>
  
  <p>fyi, i had to cut these arrays short because theyre way too long because of the static variable numbers I set.</p>
  
  <p>when I do print(multiply) before nospace, this is the output I get.</p>
  
  <pre><code>[4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5][4, 4, 5]
  </code></pre>