2-1~2-4:
1.字符串
name = ‘python’
print("hello "+name)
print('hello '+name.upper()) -----将变量name的字符全部改成大写
print('hello '+name.lower()) ------将变量name的字符全部改成小写
print('hello '+name.title()) ------将变量name的首字符改成大写
name = '\tAlbert Einstein once said, “A person who never made a mistake never tried anything new.”\n ' ---直接修改变量name
print(name.lstrip()) -----删除变量name左边的空格、\t、\n
print(name.rstrip()) -----删除变量name右边的空格、\t、\n
print(name.strip()) -----删除变量name两边的空格、\t、\n
2.数字运算
#在此处编写注销
print(2+5-1)-->6
print(2*6/3) -->4.0 #除法运算不会自动取整
print(2**3) -->8 #2的三次方