好的,我有一些适合你的人,我在新的新python终端中输入这段代码:
>>> print _
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name '_' is not defined
>>> 'magic'[::2]
'mgc'
>>> print _
mgc
>>> 'magic'[::-1]
'cigam'
>>> print _
cigam
或:
>>> def foo(x):
... return x * x
...
>>> print _
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name '_' is not defined
>>> foo(3)
9
>>> print _
9
这是正常的python行为吗?