- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 67字
- 2021-07-09 20:40:27
Membership operators
Python has two membership operators to test the membership in a sequence, such as a string, list, tuple, and others:

The following screenshot will make it clearer for you:

In the preceding screenshot, we try to search for the character, 'o', in the string, 'John', and it returns True. However, 'k' is not present in the string, and hence, it returns False.
推薦閱讀
- Drupal 8 Blueprints
- SQL學習指南(第3版)
- PyTorch自動駕駛視覺感知算法實戰
- Dependency Injection in .NET Core 2.0
- MATLAB 2020 從入門到精通
- 新手學Visual C# 2008程序設計
- Linux:Embedded Development
- JavaScript程序設計(第2版)
- Scratch·愛編程的藝術家
- Java Web從入門到精通(第3版)
- Python網絡爬蟲實例教程(視頻講解版)
- Learning Unreal Engine Game Development
- Node.js 6.x Blueprints
- 游戲設計的底層邏輯
- The Java Workshop