Python: can't assign to literal

后端 未结 8 2257
旧时难觅i
旧时难觅i 2020-11-29 10:43

My task is to write a program that asks the user to enter 5 names which it stores in a list. Next, it picks one of these names at random and declares that person as the winn

8条回答
  •  失恋的感觉
    2020-11-29 11:08

    1 is a literal. name = value is an assignment. 1 = value is an assignment to a literal, which makes no sense. Why would you want 1 to mean something other than 1?

提交回复
热议问题