See PyCharm help at https://www.jetbrains.com/help/pycharm/
#字符串的用法
#in /NOt in
‘I’ in ‘I am your father’
#布尔值为true
‘I’ not in ‘I am your father’
#布尔值为false
spam = ‘nmsl’
spam = spam.upper()
#运行结果为NMSL
spam = ‘NMSL’
spam= spam.lower()
#运行结果为nmsl
‘hello’.isalpha()
#true,只有字母
‘hello1’.isalnum()
#true,还有数字
‘1’.isdecimal()
#true,只有数字
’ ‘.isspace()
#true,只有空格
‘Oooooooooooooooo’.istitle()
#true,大写开头跟小写
‘11111’.join([‘a’,‘b’,‘c’])
#结果为’a,b,c’
‘abc’.split()
#结果为‘a,b,c’
‘nmsl’.rjust(100)
#结果为’ nmsl’
‘nmsl’.ljust(100)
#结果为’nmsl ’