Python does not use the strip () method to remove spaces

Why did he return none?

Mar.20,2021

Recursively forgot to write and return. When judging s [0] = "" , you should reutrn ltrim (s)


.

it is more convenient to replace spaces directly with re.sub

import re  
  
text = "I am an handsome boy"  
print(re.sub(r'\s+', '', text))  
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40cd3-2c55b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40cd3-2c55b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?