This video covers #strip()_method & #replace_method. It is used to solve problem with spaces.Must watch previous videos to make it more clear.Source codes are given below:
name=" Divya "
dots="......."
print(name+dots)
Divya .......
----#lstrip()-left spaces-----
print(name.lstrip()+dots)
Divya .......
--------#rstrip()-right--------
print(name.rstrip()+dots)
Divya.......
----------#strip() method---------
print(name.strip()+dots)
Divya.......
name="di vya"
print(name.strip()+dots)
di vya.......
#replace() method
---------------name.replace(" ","")----------
print(name.replace(" ",""))
divya
print(name.replace(" ","*"))
di***vya
print(name.replace(" ","")+dots)
divya.......
name,char=input("Enter your name & a single character\n").split(",")
Enter your name & a single character
Isha Sinha, i
print(f"Character count = {name.strip().lower().count(char.strip().lower())}")
Character count = 2
Must watch the video & read the codes carefully
Thank you...!!!
On this page of the site you can watch the video online strip() & replace() method [Solve problem with spaces:Python tutorial 21 with a duration of hours minute second in good quality, which was uploaded by the user Divya Bharati 25 February 2019, share the link with friends and acquaintances, this video has already been watched 42 times on youtube and it was liked by 3 viewers. Enjoy your viewing!