Professional Documents
Culture Documents
Babrak
Babrak
Babrak
ASSIGNMENT NO. 1
1.capitalize (): -
Converts the first character to upper case.
CODE: -
OUTPUT: -
2.casefold ()
Converts string into lower case
CODE: -
OUTPUT: -
3.center ()
Returns a centered string
CODE: -
OUTPUT: -
4.count ()
CODE: -
OUTPUT: -
5.endswith ()
Returns true if the string ends with the specified value
CODE: -
OUTPUT: -
6.expandtabs ()
Sets the tab size of the string
CODE: -
OUTPUT: -
7.find ()
Searches the string for a specified value and returns the position of where it was
found
CODE: -
OUTPUT: -
8.format ()
Formats specified values in a string
CODE: -
OUTPUT: -
9.index ()
Searches the string for a specified value and returns the position of where it was
found
CODE: -
OUTPUT: -
10.isalnum ()
Returns True if all characters in the string are alphanumeric
CODE: -
OUTPUT: -
11.isalpha ()
Returns True if all characters in the string are in the alphabet
CODE: -
OUTPUT: -
12.isdecimal ()
Returns True if all characters in the string are decimals
CODE: -
OUTPUT: -
13.isdigit ()
Returns True if all characters in the string are digits
CODE: -
OUTPUT: -
14.isidentifier ()
Returns True if the string is an identifier
CODE: -
OUTPUT: -
15.islower ()
Returns True if all characters in the string are lower case
CODE: -
OUTPUT: -