title: how to loop input (see my code and you will understand)
body: <p>I want my code take an input, the input not stoping until i enter empty string, and the table will print in the final output that store all the input before</p>
  
  <p>this is my code:</p>
  
  <pre><code># read file and store in file variable
  file = open("Stop Word.txt", "r")
  
   # create global array
   lists = []  
  
   # create header 
   def startingProgram():
      print("=" * 70)
      print("Masukkan Pesan: (untuk berhenti masukkan string kosong)")
      print("=" * 70)
  
  # clean punctuation and conjunction
  def message(userInput):
      punctuation = "!@#$%^&amp;*()_+&lt;&gt;?:.,;/"
      words = userInput.lower().split()
      conjunction = file.read().split("\n")
      removePunc = [char.strip(punctuation) for char in words if char not in conjunction]
      global lists
      lists = removePunc
      return removePunc
  
  # sort and count duplicate string
  def counting(words):
      w_unq = sorted(((item, words.count(item)) for item in set(words)), key=lambda x: x[1], reverse=True)
      count = 1
      for u in w_unq:
          print("{}\t{:&lt;10}\t{:&lt;0}".format(count,*u))
          count += 1
  
  # create table
  def table():
      print("Distribusi Frekuensi Kata: ")
      print("-"*70)
      print("{}\t{:&lt;10}\t{:&lt;0}".format("No","Kata","Frekuensi"))
      print("-"*70)
  
  # run program
  startingProgram()
  pesan = None
  while pesan != "":
      pesan = input("Pesan: ")
      message(pesan)
      table()
      counting(lists)
  </code></pre>
  
  <p>i don't know how to looping the #run program</p>