- Hands-On Penetration Testing with Python
- Furqan Khan
- 142字
- 2021-07-02 14:13:49
The find(), index(), upper(), lower(), len(), and count() methods
The find() function is used to search for a character or string within our target string. This function returns the first index of the string if a match is found. It returns -1 if it does not find the match:

The index() method is identical to the find() method. It returns the first index of the string if it finds the match and raises an exception if it does not find a match:

The upper() method is used to transform the input string to upper case letters and the lower() method is used to transform a given string to lowercase letters:

The len() method returns the length of the given string:

The count() method returns the number of occurrences of any character or string that we wish to count within the target string:

推薦閱讀
- WildFly:New Features
- Flask Blueprints
- 程序員考試案例梳理、真題透解與強化訓練
- Animate CC二維動畫設計與制作(微課版)
- Apache Karaf Cookbook
- Visual Basic程序設計實驗指導(第4版)
- Hands-On Microservices with Kotlin
- Learn React with TypeScript 3
- 焊接機器人系統操作、編程與維護
- Spring+Spring MVC+MyBatis從零開始學
- PHP與MySQL權威指南
- 零基礎學C語言(第4版)
- JavaScript Concurrency
- C#程序開發參考手冊
- ASP.NET jQuery Cookbook(Second Edition)