Update strings.py

pull/657/head
Yang-Thinker 2020-08-19 09:00:33 +08:00 committed by GitHub
parent cdb7fddd3a
commit 8b54a634ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ print('字符串是不是大写: ', str1.isupper())
print('字符串是不是以hello开头: ', str1.startswith('hello')) print('字符串是不是以hello开头: ', str1.startswith('hello'))
print('字符串是不是以hello结尾: ', str1.endswith('hello')) print('字符串是不是以hello结尾: ', str1.endswith('hello'))
print('字符串是不是以感叹号开头: ', str1.startswith('!')) print('字符串是不是以感叹号开头: ', str1.startswith('!'))
print('字符串是不是感叹号结尾: ', str1.endswith('!')) print('字符串是不是感叹号结尾: ', str1.endswith('!'))
str2 = '- \u9a86\u660a' str2 = '- \u9a86\u660a'
str3 = str1.title() + ' ' + str2.lower() str3 = str1.title() + ' ' + str2.lower()
print(str3) print(str3)