the code below the following error
IndexError: list index out of range
can someone help me please!
IndexError: list index out of range
can someone help me please!
import os.path list_ = [] breaking_string = ' ' print("Start Typing: ") while True: line = input() if line == ' ': break else: list_.append(line) #tf_name = input("Enter text file name: ") tf_name = 'list' if os.path.isfile(tf_name) == True: file = open(tf_name + '.txt', "a") else: file = open(tf_name + '.txt', "w") counter = 0 while len(list_) >= counter: file.write(list_[counter]) counter += 1 file.close()