как зациклить ввод (смотри мой код и ты поймешь)

Я хочу, чтобы мой код принимал ввод, ввод не прекращался до тех пор, пока я не ввожу пустую строку, а таблица будет печатать в окончательном выводе, в котором хранятся все входные данные до

это мой код:

# 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 = "!@#$%^&*()_+<>?:.,;/"
    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{:<10}\t{:<0}".format(count,*u))
        count += 1

# create table
def table():
    print("Distribusi Frekuensi Kata: ")
    print("-"*70)
    print("{}\t{:<10}\t{:<0}".format("No","Kata","Frekuensi"))
    print("-"*70)

# run program
startingProgram()
pesan = None
while pesan != "":
    pesan = input("Pesan: ")
    message(pesan)
    table()
    counting(lists)

я не знаю, как зациклить программу #run


person Bimabara    schedule 15.10.2019    source источник
comment
как насчет Stop Word.txt? каково содержание, что вы собираетесь с ним делать?   -  person MrFuppes    schedule 15.10.2019
comment
это файл, содержащий все соединения, которые я хочу удалить из пользовательского ввода   -  person Bimabara    schedule 15.10.2019