s='hello,python'
print('1.',s.isidentifier())
#False 其中含有,不是合法的标识符
print('2.','hello'.isidentifier())
print('3','张三_'.isidentifier())
print('4.','张三_123'.isidentifier())#字母,数字,下划线都可以(张三属于字母)
#2. True
#3. True
#4. True
print('6.','abc'.isalpha())
print('7.','张三'.isalpha())
print('8.','张三1'.isalpha())
#6. True
#7. True
#8. False
print('9.','123'.isnumeric())
print('10.','123四Ⅳ④'.isnumeric())
#9. True
#10. True
s='hello,Python'
print(s)
print(s.replace('Python','java'))
#hello,Python
#hello,java
s1='hello,python,python,python'
print(s1)
print(s1.replace('python','java',2))
#hello,python,python,python
#hello,java,java,python
lst=['hello','java','python']
print('|'.join(lst))
print(''.join(lst))
#hello|java|python
#hellojavapython
t=('hello','java','python')
print(''.join(t))
#hellojavapython 元组,列表都可以
print('*'.join('python'))
#p*y*t*h*o*n