官术网_书友最值得收藏!

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:

主站蜘蛛池模板: 民丰县| 融水| 阿克苏市| 商都县| 绥化市| 灵寿县| 嘉峪关市| 天峻县| 普定县| 邵阳县| 什邡市| 凭祥市| 左云县| 铁岭县| 云南省| 蓬莱市| 佳木斯市| 邢台县| 江源县| 潍坊市| 石阡县| 化德县| 安义县| 临桂县| 镇赉县| 乐陵市| 纳雍县| 青川县| 南雄市| 宾川县| 乌拉特中旗| 和政县| 大同市| 郁南县| 华宁县| 兴安县| 长泰县| 固镇县| 庆安县| 清原| 英超|