- 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:

推薦閱讀
- Embedded Linux Projects Using Yocto Project Cookbook
- Mastering Visual Studio 2017
- Big Data Analytics
- Kali Linux Wireless Penetration Testing Beginner's Guide(Third Edition)
- Spring Boot Cookbook
- Mastering Data Mining with Python:Find patterns hidden in your data
- 軟件測試實用教程
- 持續輕量級Java EE開發:編寫可測試的代碼
- Java Web從入門到精通(第3版)
- 軟件測試綜合技術
- 創意UI:Photoshop玩轉APP設計
- Unity 2017 Game AI Programming(Third Edition)
- Python+Office:輕松實現Python辦公自動化
- C#程序設計基礎入門教程
- Web前端開發最佳實踐