MediumString methods. String is python data type wich used to… | by RAGHU Vanaparthi | Nov, 2026 | Medium
Sitemap
RAGHU Vanaparthi

RAGHU Vanaparthi

String methods

2 min read2 days ago

String is python data type wich used to represent text data

methods:methods is nothing but functoins this methods can apply only strings tht called methods

How to apply this string method wich is using .(dout)

string.method()

Aributte error: this python data not support this method means whener youapply wromg method was atributte error

1)Lower

lower case was it is used for string

it string method was convet to upper case to lower case charecter and often charecter ignored by the string

and return a new string

Press enter or click to view image in full size

2)Upper

the upper case used for string

it converts to the lower casecharecter to upper case the often charecters are ignore by the upper case

return to anew string

Press enter or click to view image in full size

3)swapcase

swapcase used by string

in wich we are converts the lower case to upper case and upper case to lower case the often charecters are ignored

Get RAGHU Vanaparthi’s stories in your inbox

Join Medium for free to get updates from this writer.

return to a new string

Press enter or click to view image in full size

4)capitalize

capitalize used in string

it is used to convert the first charecter into upper case and often charecters into the lower case

return a new string

Press enter or click to view image in full size

5)Tittle

tittle was used for string

it was used for the words the word was first latter of the string was upper case the word of often letters was lower case and rest of the charecters are ignored that was the tittle

Press enter or click to view image in full size

6)Count

Count was used for the string

the count was how many letters in the string that was the count the string was left to right

Press enter or click to view image in full size

if the count was some part of letters was the

Example:

some part pick the string

“aaaaaaa”.count(“a”,2,6)

output:aaaa

--

--