Complete Video Learning
Table of Contents
The strip( ) method removes any whitespace from the beginning or the end.
This method removes any whitespace from the beginning or the end.
a = " Hello,NIELITBHU World! " print(a.strip())
The len( ) method returns the length of a string,tuple,list,sets,Dictionary.
a = "Hi,NIELITBHU" print(len(a))
The lower( ) method returns the string in lower case.
a = "Hi,NIELITBHU" print(a.lower())
The upper( ) method returns the string in the upper case.
a = "hi,nielitbhu" print(a.upper())
The replace( ) method replaces a string with another string.
a = "hi,nielitbhu" print(a.replace("h", "#"))
The split( ) method splits.
a = "hi,nielit,bhu" print(a.split(","))