0% found this document useful (0 votes)
2 views2 pages

Python Notes

The document explains various built-in string methods in Python, including upper(), lower(), strip(), and split(). It provides examples of how to convert strings to upper and lower case, remove whitespace, and split strings into substrings. Each method is demonstrated with code snippets for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Python Notes

The document explains various built-in string methods in Python, including upper(), lower(), strip(), and split(). It provides examples of how to convert strings to upper and lower case, remove whitespace, and split strings into substrings. Each method is demonstrated with code snippets for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

STRING

Python has a built in method that you can use on string

Upper_Case
The upper() method returns the string in upper_case
a = “Aarush bhattarai”
Converted_a = [Link]()
print(a)
print(Converted_a)

Lower case
The lower() method returns the sting in lower case
a = “AARUSH BHATTARAI”
converted_a = [Link]()
print(a)
print(converted_a)

Remove white space


The strip() method removes any white space from the
beginning or the end:

A=“ hello world”


Converted_a = ([Link]())

Split method

The split method splits the string substrings if it find


instance of the spectator:

A = “hello world”
Print([Link](“ “))

You might also like