I'm getting the error list assignment index out of range when trying to assign values to an array. Why am I getting this error and how do I fix it?
array_questions = input("How many words would you like to search for? (maximum of 5): ")
to_search_words = []
x = int(array_questions)
y = 0
z = y + 1
while x > 0:
y + 1
str = ("%d. " % z)
to_search_words[y] = input(str)