Aas*_*jan 3 python membership operators python-3.x
>>> g = [1, True, 5]
>>> print(1 in g in g)
False
>>> g.append(g)
>>> print(1 in g in g)
True
Run Code Online (Sandbox Code Playgroud)
为什么第一个片段在列表中并且也在列表中False时作为输出给出?1True
True当我附加g到它时,为什么它作为输出给出?
| 归档时间: |
|
| 查看次数: |
47 次 |
| 最近记录: |