而name则是input函数的返回值
input函数的返回值默认是字符串形式的 >>> help(input)
Help on built-in function input in module builtins:
input(prompt=None, /)
Read a string from standard input.The trailing newline is stripped.
The prompt string, if given, is printed to standard output without a
trailing newline before reading input.
If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
On *nix systems, readline is used if available.
======以上是函数帮助文档======
你别纠结python为什么这么设计,你要知道该这么用就对了
就好像你吃饭,你吃进嘴里的是饭,你硬要问为什么不能说吃的是米一样
页:
[1]