- 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.
推薦閱讀
- Spring Cloud Alibaba微服務架構設計與開發實戰
- FreeSWITCH 1.6 Cookbook
- 深入淺出Android Jetpack
- Java性能權威指南(第2版)
- Java設計模式及實踐
- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- 焊接機器人系統操作、編程與維護
- 大數據分析與應用實戰:統計機器學習之數據導向編程
- OpenResty完全開發指南:構建百萬級別并發的Web應用
- Learning Apache Karaf
- Python預測分析與機器學習
- HTML5移動前端開發基礎與實戰(微課版)
- 虛擬現實建模與編程(SketchUp+OSG開發技術)
- 網頁設計與制作
- HTML5 WebSocket權威指南