Newbie inquiry about NameError
问题 Total Newbie question for which I have searched the site. I am running a really simple program in Chapter 2 of Automate the Boring Stuff and I keep getting a NameError. The first line is if name == 'Alice': And it results in NameError: name 'name' is not defined Any thoughts on this. Cannot find this NameError in the index or any sites. Thanks 回答1: In the book you missed this comment above the code: " (Pretend name was assigned some value earlier.) ". So you need to do that. For example