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...!!!
Auf dieser Seite können Sie das Online-Video strip() & replace() method [Solve problem with spaces:Python tutorial 21 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Divya Bharati 25 Februar 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 42 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!