I am writing some very simple code for a random quote program - have read various threads on this issue but cannot spot my error. The error is triggered on the penultimate line. Thanks in advance.
enter code here
enter code hereimport random
quote_str = [
["Tis better to have loved and lost than never to have loved at all",
"Alfred Lord Tennyson"],
["To be or not to be, that is the question.","William Shakespeare"],
["No one can make you feel inferior without your consent.","Eleanor Roosevelt"],
["You are your best thing.","Toni Morrison"]]
x = random.choice([0,1,2,3])
quote = "Quote: {0} Author: {1}".format(quote_str[x][0])
print(quote)