字符串的使用
- 双引号和单引号的使用:"" ‘’ \ “”"""’
- 字符串的输出与输入:input()print()
- 字符串操作:+ *
- 类型转换:int() float() str() type()
print("hello")
print('world')
print('hello \nworld')
print("hello \nworld")
输出结果:
hello
world
hello
world
hello
world
#输出的结果都是一样的,双引号和单引号无本质上的区别,双引号更加的美观,\n是转义符,通过\n可以进行换行
#用反斜杠\转义,\为转义字符
print('\"hello\"')
#输出
”hello“