- Hands-On Penetration Testing with Python
- Furqan Khan
- 102字
- 2021-07-02 14:13:48
The strip(), lstrip(), and rstrip() methods
The strip method is actually used to strip off the white spaces from the input string. By default, the strip method will strip off the spaces from both the left and right sides of the string and will return a new string without spaces on both the leading and trailing sides, as shown in the following screenshot:

However, if we only wish to strip off the left spaces ,we can use the lstrip() method. Similarly, if we just wish to strip off the right spaces, we can use the rstrip() method. This is shown as follows:

推薦閱讀
- HornetQ Messaging Developer’s Guide
- Visual C++程序設計教程
- 大學計算機應用基礎實踐教程
- Oracle 12c中文版數據庫管理、應用與開發實踐教程 (清華電腦學堂)
- Neo4j Essentials
- Python編程:從入門到實踐
- Learning AngularJS for .NET Developers
- Quantum Computing and Blockchain in Business
- 機器學習微積分一本通(Python版)
- Building Dynamics CRM 2015 Dashboards with Power BI
- App Inventor 2 Essentials
- JavaScript編程精解(原書第2版)
- Yii2 By Example
- Java EE 7 Development with WildFly
- Visual Basic.NET程序設計