字符串知识点:
string.title()
string.rstrip()
string.lstrip()
string.strip()
字符串部分练习题答案:
name = ’ Ya Wei ’
message = (‘Hello %s,would you liake to learn some Python today?’ % name)
print(name.title())
print(name.lower())
print(name.upper())
print(name.strip())
数字知识点:
两个乘号()表示乘方:如: 106 = 1000000
string = str(int)
print(3*0.1)
数字部分练习题答案:
print(3+5)
print(10-2)
print(2**3)
print(16/2)
num = 5
print('my favorite num is '+ str(num) )
Python之禅:
转 Python 字符串操作方法大全 https://www.cnblogs.com/printN/p/6924077.html