"""
我于黑暗中蛰伏,只为抓住黎明一瞬
Author:huihan
Time:2022/2/27 20:46
"""
nums='jjj'
print(nums.capitalize())
nums='jjjASD'
print(nums.casefold())
nums='jjjASD'
result=nums.center(8)
print(result)
str1 = 'how are you? i am fine, thank you! and you?'
print(str1.count('o'))
print(str1.count('you'))
str1 = 'how are you? i am fine, thank you! and you?'
print(str1.endswith('you?'))
str = "runoob\t12345\tabc"
print('原始字符串:', str)
str1 = 'how are you? i am fine, thank you! and you?'
print(str1.find('you'))
print(str1.rfind('you'))
print("{2} {0}".format("0","6","5"))
print("{0} {1}".format("hello", "world"))
People = {"name": "john", "age": 33}
print("My name is {name},iam{age} old".format_map(People))
print(str1.index('you'))
print(1111111111)
print('234一十百万千ⅠⅤ壹'.isalnum())
str = "runoob菜鸟教程"
print(str.isalpha())
str = u"this2009"
print(str.isdecimal())
print('234一'.isdigit())
print( "123".isidentifier() )
print('jhui'.islower())
print('234一十百万千ⅠⅤ壹'.isnumeric())
txt = "Hello!\nAre you #1?"
x = txt.isprintable()
print(x)
str = " "
print (str.isspace())
str = "This Is String Example...Wow!!!"
print (str.istitle())
str = "THIS is string example....wow!!!"
print (str.isupper())
list1 = ['name', 'age', 'gender']
result = '+'.join(list1)
print(result)
str = "Runoob example....wow!!!"
print (str.ljust(50, '*'))
str = "Runoob example....wow!!!"
print(str.lower())
str = "88888888this is string example....wow!!!8888888";
print( str.lstrip('8') );
str1 = 'abnsmahsjdbmnsdxybksdall'
table = str.maketrans('ab', '12')
result = str1.translate(table)
print(result)
txt = "I could eat bananas all day"
x = txt.partition("apples")
print(x)
str1 = 'how are you? i am fine, thank you! and you?'
result = str1.replace('you', 'me')
print(result)
str1 = 'how are you? i am fine, thank you! and you?'
print(str1.rfind('you'))
str1 = 'how are you? i am fine, thank you! and you?'
str1 = 'how are you? i am fine, thank you! and you?'
print(str1.rjust(60,'/'))
txt = "I could eat bananas all day, bananas are my favorite fruit"
x = txt.rpartition('a')
print(x)
str1 = '123**abc*mn'
result = str1.rsplit('*', 5)
print(result)
txt = "banana,,,,,ssaaww....."
x = txt.rstrip(",.aws")
print(x)
str1 = '123*abc*mn'
result = str1.split('*')
print(result)
str1 = '*123*abc*mn*'
result = str1.split('*')
print(result)
str1 = '123**abc*mn'
result = str1.split('*')
print(result)
str1 = '123*abc*mn*xyz*你好'
result = str1.split('*', 2)
print(result)
txt = "Thank you for your visiting\nWelcome to China"
x = txt.splitlines()
print(x)
txt = "Hello, welcome to my world."
x = txt.startswith("Hello")
print(x)
str1 = '\t \n a b c \n\n'
print(str1)
print('============================')
print(str1.strip())
print('============================')
print(str1.lstrip())
txt = "Hello My Name Is Elon"
x = txt.swapcase()
print(x)
txt = "Welcome to my world"
x = txt.title()
print(x)
txt = "Hello my friends"
x = txt.upper()
print(x)
txt = "50"
x = txt.zfill(5)
print(x)