- The Python Apprentice
- Robert Smallshire Austin Bingham
- 100字
- 2021-07-02 22:16:54
None
Python has a special null value called None, spelled with a capital N. None is frequently used to represent the absence of a value. The Python REPL never prints None results, so typing None into the REPL has no effect:
>>> None
>>>
The null value None can be bound to variable names just like any other object:
>>> a = None
and we can test whether an object is None by using Python's is operator:
>>> a is None
True
We can see here that the response is True, which brings us conveniently on to the bool type.
推薦閱讀
- Learning NServiceBus(Second Edition)
- Python數據可視化:基于Bokeh的可視化繪圖
- Unity 2020 Mobile Game Development
- SQL語言從入門到精通
- Apex Design Patterns
- Android玩家必備
- Mastering Linux Security and Hardening
- Python入門很輕松(微課超值版)
- Java Web從入門到精通(第3版)
- Spring技術內幕:深入解析Spring架構與設計原理(第2版)
- Mastering Apache Storm
- RESTful Web Clients:基于超媒體的可復用客戶端
- 從零開始學Python大數據與量化交易
- Python Automation Cookbook
- Data Manipulation with R(Second Edition)