python 字符串输出
2024-08-25 06:19:26
>>> 'spam eggs' # single quotes
'spam eggs'
>>> 'doesn\'t' # use \' to escape the single quote...
"doesn't"
>>> "doesn't" # ...or use double quotes instead
"doesn't"
>>> '"Yes," they said.'
'"Yes," they said.'
>>> "\"Yes,\" they said."
'"Yes," they said.'
>>> '"Isn\'t," they said.'
'"Isn\'t," they said.'
>>> '"Isn\'t," they said.'
'"Isn\'t," they said.'
>>> print('"Isn\'t," they said.')
"Isn't," they said.
>>> s = 'First line.\nSecond line.' # \n means newline
>>> s # without print(), \n is included in the output
'First line.\nSecond line.'
>>> print(s) # with print(), \n produces a new line
First line.
Second line.
最新文章
- java类型占用字节数&;类型转换
- 游戏世界之Unity3D的基础认识
- Ext.widget()作用是使用别名创建对象。
- C++设计模式——单例模式
- 【Stage3D学习笔记续】山寨Starling(一):从事件说起
- Swift 学习手记1,pod 的 类库使用
- 七种Prolog解释器/编译器
- Xcode5 创建模板和UIView 关联XIB
- HDU-4689 Derangement
- 递归回溯 UVa140 Bandwidth宽带
- Android hybrid App项目构建和部分基本开发问题
- 最大熵模型和EM算法
- Cocos2dx 代码中包含中文导致编译错误的问题解决方法
- CentOS下安装Git
- 如何去除Launcher默认的google search bar?
- U811.1接口EAI系列之六--物料上传--VB语言
- unity, 2d rope
- 杨恒说李的算法好-我问你听谁说的-龙哥说的(java中常见的List就2个)(list放入的是原子元素)
- ABORT: Can't find command 'my_print_defaults'.
- lykchat+zabbix实现微信告警