编辑器+解释器
变量:可随时改变变量值,python始终记录最新值
变量命名规则和使用:字母、数字、下划线。数字不能开头。
变量名不能和关键字或函数相同。慎用I1i 0oO
尽量少用大写
message_huyang = “hello word”
print(message_huyang)
message_huyang = “hello huyang胡阳”
print(message_huyang.title())#首字母大写
print(message_huyang.upper())#全部大写
print(message_huyang.lower())#全部小写
first_name = “a”
last_name = “z”
full_name = first_name+""+last_name#合并字符串
print(full_name)
print(“hello,”+full_name.title()+"!")
print(“hello,”+full_name.lower()+"!")
message1 = “hello,”+full_name.title()+"!"#用一个变量表示
print(message1)
print("\tmessage2")#制表符添加空白
print(" a\n b\n c\n")
message2 = “'huyang1 '”
print(message2.rstrip())#删除空白HAve question
print(message2)
import this#python之道