1.

Write a short about the followings with suitable example?

Answer»
SyntaxDescriptionExample
CapitalizeUsed to capitalize the first character of the string>>> city = "chennai"
>>>print(city.capitalize())Chennai
swap caseIt will change case of every character to its opposite case vice-versa.>>>strI = "tAmiLNaDu"
>>>print(strI.swapcase())TamllnAdU


Discussion

No Comment Found