The next day pyhon learning python string manipulation

s = 'cescesc'

print (s.isupper) # judge is not all uppercase letters

print (s.isdigit) # determines whether bit number

print (s.islower) # judgment is not lowercase

number = input ( 'Enter to produce a few:')

print (s.index ( 'd')) # can not find the error

print (s.find ( 'd')) can not be found reported -1

s.count ( 'a') statistical number appears

s.strip () clear space

s.lstrip () to remove the spaces left

s.rlstrp () the right to remove spaces

s.startswith () # determine what the beginning

s.endswith () to determine what end

 

Guess you like

Origin www.cnblogs.com/weilemeizi/p/11511196.html