您的位置:首页 > 编程语言 > Python开发

python | 变量与数据 | 字符串转义 | 多行输入

2018-01-07 15:29 274 查看
# encoding: utf-8

# 字符串转义
s = 'I\'m ok'
print(s)
s = 'Learn \"Python\" in imooc'
print(s)
s = 'Bob said \"I\'m ok\"'
print(s)

# r 不进行转义
print(r"\ndfd\n\fdfd\n")

# 输入多行
s = '''Python is created by "Guido".
It is free and easy to learn.
Let's start learn Python in imooc!'''
print(s)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python
相关文章推荐