.str string type
1. capitalize the first letter capitalized
Example:
1 a = 'alex' 2 v = a.capitalize() 3 print(v)
# 输出
# Alex
Source:
1 def capitalize(self, *args, **kwargs): # real signature unknown 2 """ 3 Return a capitalized version of the string. 4 5 More specifically, make the first character have upper case and the rest lower 6 case. 7 """
2. casefold corresponding character string becomes small
Example:
. 1 A = ' Alex ' 2 V = a.casefold () . 3 Print (V)
# output
# alex
Source:
1 def casefold(self, *args, **kwargs): # real signature unknown 2 """ Return a version of the string suitable for caseless comparisons. """