Case Conversion Methods



This category of built-in methods of Python's str class deal with the conversion of alphabet characters in the string object. Following methods fall in this category −

Sr.No. Method & Description

1

capitalize()

Capitalizes first letter of string

2

casefold()

Converts all uppercase letters in string to lowercase. Similar to lower(), but works on UNICODE characters alos

3

lower()

Converts all uppercase letters in string to lowercase.

4

swapcase()

Inverts case for all letters in string.

5

title()

Returns "titlecased" version of string, that is, all words begin with uppercase and the rest are lowercase.

6

upper()

Converts lowercase letters in string to uppercase.

python_string_methods.htm
Advertisements
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy