menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Python Day...
source image

Dev

4w

read

169

img
dot

Image Credit: Dev

Python Day-22 String Functions logic using loops, Recursion, Tasks

  • To add space between strings, iterate through the characters of the string and add a space whenever an uppercase letter is encountered.
  • To remove space between strings, iterate through the characters of the string and skip the spaces.
  • To remove spaces in the left side of the string, iterate through the characters of the string and skip the spaces until an alphabet character is encountered.
  • To remove spaces in the right side of the string, iterate through the characters of the string in reverse order and skip the spaces until an alphabet character is encountered.

Read Full Article

like

10 Likes

For uninterrupted reading, download the app