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

推薦閱讀
- 數(shù)據(jù)庫系統(tǒng)原理及MySQL應(yīng)用教程(第2版)
- TypeScript入門與實(shí)戰(zhàn)
- Developing Mobile Web ArcGIS Applications
- 面向STEM的Scratch創(chuàng)新課程
- C語言程序設(shè)計(jì)立體化案例教程
- Easy Web Development with WaveMaker
- 精通網(wǎng)絡(luò)視頻核心開發(fā)技術(shù)
- 信息技術(shù)應(yīng)用基礎(chǔ)
- SQL Server 2016數(shù)據(jù)庫應(yīng)用與開發(fā)
- Webpack實(shí)戰(zhàn):入門、進(jìn)階與調(diào)優(yōu)
- Spring Boot+Vue全棧開發(fā)實(shí)戰(zhàn)
- Scala Data Analysis Cookbook
- Learning D3.js 5 Mapping(Second Edition)
- Java程序設(shè)計(jì)教程
- JavaScript設(shè)計(jì)模式與開發(fā)實(shí)踐