Python编程学习入门笔记(二)
1、变量:只能包含字幕、下划线、数字,不能以关键字和函数名、数字开头,不能包含空格,变量应简短且有描述性。例:message="Hellopythonworld!"message即为变量在【运行】时点击选择【python】模式



2、字符串:括号内的引号可以是双引号也可以是单引号。例:print("thisisaapple")print('thisisapen')
3、(1)使用方法修改亨蚂擤缚字符串的大小写:可通过后缀关键词“.title()”-首字母大写“.upper()”-全大写“.lower()”-全小写 的方式进行更改例:message="hellopythonworld!"print(message.title())


4、合并字符串(使用“陴鲰芹茯+”连接)例:first_name="asd"last_name="fgh"full_name=first_name+""+last_nameprint(full_name)

