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...!!!
Nesta página do site você pode assistir ao vídeo on-line strip() & replace() method [Solve problem with spaces:Python tutorial 21 duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Divya Bharati 25 Fevereiro 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 42 vezes e gostou 3 espectadores. Boa visualização!