>>>s = 'welcome to visit furzoom.com'
>>>s.capitalize()
'Welcome to visit furzoom.com'
>>>s.center(50)
' welcome to visit furzoom.com '
>>>s.center(50, '#')
'###########welcome to visit furzoom.com###########'
>>>s.count('om')
3
>>>s.count('om', -10)
2
>>>s.count('om', 0, 10)
1
>>>s.decode()
u'welcome to visit furzoom.com'
>>>s.decode().encode()
'welcome to visit furzoom.com'
>>>s.endswith('com')
True
>>>s.endswith('')
True
>>>s.endswith('mn')
False
>>>s.endswith('co', 0, -1)
True
>>>s1 = '1\t23\t456\t789'
>>>s1.expandtabs()
'1 23 456 789'
>>>s1.expandtabs(4)
'1 23 456 789'
>>>s1.expandtabs(3)
'1 23 456 789'
>>>s1.expandtabs(5)
'1 23 456 789'
>>>s1.expandtabs(6)
'1 23 456 789'
>>>s.find('om')
4
>>>s.find('mn')
-1
>>>s.find('om', 5)
22
>>>s.index('om')
4
>>>s.index('mn')
Traceback (most recent call last):
File "", line 1, in
ValueError: substring not found
>>>'234'.isalnum()
True
>>>s.isalnum()
False
>>>''.isalnum()
False
>>>s.isalpha()
False
>>>'furzoom'.isalpha()
True
>>>s.isdigit()
False
>>>'234'.isdigit()
True
>>>''.isdigit()
False
>>>s.islower()
True
>>>'234'.islower()
False
>>>s.isspace()
False
>>>' \t'.isspace()
True
>>>s.istitle()
False
>>>'Welcome To Furzoom'.istitle()
True
>>>s.isupper()
False
>>>'MN'.isupper()
True
>>>'#'.join([str(i) for i in range(10)])
'0#1#2#3#4#5#6#7#8#9'
>>>s.ljust(40)
'welcome to visit furzoom.com '
>>>s.ljust(40, '#')
'welcome to visit furzoom.com############'
>>>s.lower()
'welcome to visit furzoom.com'
>>>ss = s.center(40)
>>>ss
' welcome to visit furzoom.com '
>>>ss.lstrip()
'welcome to visit furzoom.com '
>>>ss.lstrip(' we')
'lcome to visit furzoom.com '
>>>s.partition('om')
('welc', 'om', 'e to visit furzoom.com')
>>>s.partition('mn')
('welcome to visit furzoom.com', '', '')
>>>s.replace('o', '#')
'welc#me t# visit furz##m.c#m'
>>>s.replace('o', '#', 3)
'welc#me t# visit furz#om.com'
>>>s.rfind('o')
26
>>>s.rfind('o', 25)
26
>>>s.rfind('o', -3)
26
>>>s.rfind('o', -3, -20)
-1
>>>s.rfind('o', 5, 15)
9
>>>s.rindex('om')
26
>>>s.rjust(40)
' welcome to visit furzoom.com'
>>>s.rjust(40, '#')
'############welcome to visit furzoom.com'
>>>s.rpartition('oom')
('welcome to visit furz', 'oom', '.com')
>>>s.rsplit()
['welcome', 'to', 'visit', 'furzoom.com']
>>>s.rsplit(' ', 2)
['welcome to', 'visit', 'furzoom.com']
>>>ss.rstrip()
' welcome to visit furzoom.com'
>>>ss.rstrip(' m')
' welcome to visit furzoom.co'
>>>'ab\n\nde fg\rhi\r\n'.splitlines()
['ab', '', 'de fg', 'hi']
>>>'ab\n\nde fg\rhi\r\n'.splitlines(True)
['ab\n', '\n', 'de fg\r', 'hi\r\n']
>>>''.splitlines()
[]
>>>''.split('\n')
['']
>>>'line\n'.split('\n')
['line', '']
>>>'line\n'.splitlines()
['line']
>>>s.startswith('wel')
True
>>>s.startswith(' ')
False
>>>ss.strip()
'welcome to visit furzoom.com'
>>>ss.strip(' wm')
'elcome to visit furzoom.co'
>>>s.swapcase()
'WELCOME TO VISIT FURZOOM.COM'
>>>s.title()
'Welcome To Visit Furzoom.Com'
>>>s.title().swapcase()
'wELCOME tO vISIT fURZOOM.cOM'
>>>s.translate(None, 'aeiou')
'wlcm t vst frzm.cm'
>>>import string
>>>s.translate(string.maketrans('aeiou', '12345'))
'w2lc4m2 t4 v3s3t f5rz44m.c4m'
>>>s.upper()
'WELCOME TO VISIT FURZOOM.COM'
>>>s.zfill(40)
'000000000000welcome to visit furzoom.com'