Python 入门(一)定义字符串+raw字符串与多行字符串
定义字符串
前面我们讲解了什么是字符串。字符串可以用''
或者""
括起来表示。
如果字符串本身包含'
怎么办?比如我们要表示字符串 I'm OK
,这时,可以用" "
括起来表示:
"I'm OK"
类似的,如果字符串包含"
,我们就可以用' '
括起来表示:
'Learn "Python" in imooc'
如果字符串既包含'
又包含"
怎么办?
这个时候,就需要对字符串的某些特殊字符进行“转义”,Python字符串用\
进行转义。
要表示字符串 Bob said "I'm OK".
由于 ' 和 " 会引起歧义,因此,我们在它前面插入一个\
表示这是一个普通字符,不代表字符串的起始,因此,这个字符串又可以表示为
'Bob said \"I\'m OK\".'
注意:转义字符 \ 不计入字符串的内容中。
常用的转义字符还有:
\n 表示换行
\t 表示一个制表符
\\ 表示 \ 字符本身
任务
请将下面两行内容用Python的字符串表示并打印出来:
Python was started in 1989 by "Guido".
Python is free and easy to learn.
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAB1CAIAAAD4PlhKAAAUSUlEQVR4nO2dT2skR5qH60PsZQ+1QoeBZjA6LDSYqZENzYDGavoisGDFqG28g/FerGalBjPN4LHBFizoMlbTLWF0anQzwg3NHqRe8EFCn6I+gL5E7SGrMiMy442MyIqKyCg9Dz+aqqzIiMiI0Ju/jsg/g3/5139DCCGEEEL90SB5DRBCCCGEkCr8GUIIIYRQv4Q/QwghhBDql/BnCCGEEEL9Ev4MIYQQQqhfGtzd3Q1XVlEoDQAABCYAAG7gz/BnABCJ1AEfALIBf4Y/A4BIpA74AJAN+DP8GQBEInXAB4BswJ/hzwAgEqkDPgBkA/4MfwYAkUgd8AEgG/Bn+DMAiETqgA8A2YA/w58BQCRSB3wAyAb8Gf4MACKROuADQDbgz/BnABCJ1AEfALIBf4Y/A4BIpA74AP2l/APpyV9K8vrgz/BnABCJJFEeoP+UfyA9+UvpQ33wZ/gzAIhEmKgdKNuAVYImjs0bdmC4F2EZP/FrPpEnq3zHeWtK96Mz1icm+DP8GQBEIljgbpzDguQD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rf/jjevJqIISyU+qADwDZgD/zFv4MIdRNqQM+AGQD/sxb+DOEUDelDvgAkA1L4M8+/vr7y7ffH0S7NQ9/hhDqptQBHwCyIYg/+/Ll7c317c317c0v3z7uuT/79Nnlz08/nqdE/BlCqJtSB3wAyIYA/uyL1zcv/7r24PdrD/78j19uL/7+516vb+LPEEKplDrgA0A2hF3ffPz3X/2m0PTg9fHX31/+sLnzw/Hl2+PLt8dvvn44/Wn09M3PTz8ePX3z9vjy7XFlsMotb5/ttOZTJS6l7WXUo28uplOD17c3/3y6OsSfIYS6KnXAB4BsCOvPvnx5O5tL6+rP3h5f/rC5Oizs1GzVcmqtiq8PD35WrNv014Y/02yZ8qvX/NlHL365fvm0thF/hhDqptQBHwCyIaQ/++L1zfWv/9jw2UUPXsW8V/l15wfVY1VXmFXbCxn9WZXP5pF6dZq3P7s9/ou+EX+GEOqm1AEfALIhmD/b+Pbi2vPiMz9/Jq9FLs6fDacW7eb69qacSMOfIYS6KXXAB4BsCOPPupmzFn/28ODn46NPV1aHSf3ZTI++uZhaNPwZQqibUgd8AMiGEP7sr6+6mTO7P/v0WXX9fkB/pi+Veqi8Fg1/hhDqptQBHwCyYX5/Vj38bKZXX8zhz4w3Vwr+TE9f7WLzZ9peLfdvajdvXl/87aOV1SH+DCHUVakDPgBkQ6/eH1C7/qynwp8hhLopdcAHgGzAn3kLf4YQ6qbUAR8AsgF/5i38GUKom1IHfADIhl75szyEP0MIdVPqgA8A2TC4u7v73YMPUil5uEQIoWhKHfABIBvwZwghFEmpAz4AZAP+DCGEIil1wAeAbMCfIYRQJKUO+ACQDfgzhBCKpNQBHwCyAX+GEEKRlDrgA0A24M8QQiiSUgd8AMgG/BlCCEVS6oAPANmAP0MIoUhKHfABIBvwZwghFEmpAz4AZMP/A/WNIvvP7OxZAAAAAElFTkSuQmCC" alt="" />
raw字符串与多行字符串
如果一个字符串包含很多需要转义的字符,对每一个字符都进行转义会很麻烦。为了避免这种情况,我们可以在字符串前面加个前缀 r
,表示这是一个 raw 字符串,里面的字符就不需要转义了。例如:
r'\(~_~)/ \(~_~)/'
但是r'...'
表示法不能表示多行字符串,也不能表示包含'
和 "
的字符串(为什么?)
如果要表示多行字符串,可以用'''...'''
表示:
'''Line 1
Line 2
Line 3'''
上面这个字符串的表示方法和下面的是完全一样的:
'Line 1\nLine 2\nLine 3'
还可以在多行字符串前面添加 r
,把这个多行字符串也变成一个raw字符串:
r'''Python is created by "Guido".
It is free and easy to learn.
Let's start learn Python in imooc!'''
任务
请把下面的字符串用r'''...'''
的形式改写,并用print打印出来:
'\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA0UAAAB2CAIAAACI4698AAATFklEQVR4nO2dPW/cxhaG9SNucwtdQUUAIwjUpVoILjeR4WaBqFhARpAbBKqiAJKrIEgQwFC1nQNLgqEqUHcR2IAryaUN/Yr9K3sLLr85w5nhIQ9353nwFloueebMkD58PSSXO//6938QQgghhNDmakc9A4QQQggh1EX4OYQQQgihzRZ+DiGEEEJos7Wzu7eP3LUDAGBgBQCgBH4OPwcAMmjXcwCIF/wcfg4AZNCu5wAQL/g5/BwAyKBdzwEgXvBz+DkAkEG7ngNAvODn8HMAIIN2PQeAeMHP4ecAQAbteg4A8YKfw88BgAza9RwA4gU/h58DABm06zkAxAt+Dj8HADJo13MAiBf8HH4OAGQQrs5pQPHIMAbYvyALfg4/BwAySJbmNKB4ZBgD7F8QBz+HnwMAGSRLc23yRqpF8VQjJ2w86/tXN5/xtLIdx6dKL/Bz+DkAkEGsLjed7OsLg1sUTBVW/uPZfQ86xu8P2QO+HrynyIPR6/gYG1V3SJulgU8PALBBDFS1Ozc0WKoq+PZu08ez3npYPlq9kMpfi/Fki5/DzwGADANV7Q33H33j27uxjafvsVRfOSwfraNCKn8txpMtfg4/BwAyDFS1mxrySmPHfCe+VHfqcYofXZqwr9yYp+/usKyvOJ7uK5vyH2zc3FPqNX/3Vla14bUMRW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i6p+KV79lv8XOU5vqa71OvPP3rECXouwT0ftzjtJ29Lv7KHLk8dBs2Sf6/jE+LnRPZvs4x+zj//7NLk3XQS3i/TfvQ/fvJLpbPjw+lt+POtAccDfm5/Fz8HAHqM4f0QCCG0DdKu5wAQL/g5hBCSkXY9B4B4wc8hhJCMtOs5AMQLfg4hhGSkXc8BIF52vnjyVX9SL68IITSYtOs5AMQLfg4hhGSkXc8BIF7wcwghJCPteg4A8YKfQwghGWnXcwCIF/wcQgjJSLueA0C84OcQQkhG2vUcAOIFP4cQQjLSrucAEC/4OYQQkpF2PQeAeMHPIYSQjLTrOQDEC34OIYRkpF3PASBe8HMIISQj7XoOAPGCn0MIIRlp13MAiBf8HEIIyUi7ngNAvPwf0o6LZOaBpWUAAAAASUVORK5CYII=" alt="" />
Python 入门(一)定义字符串+raw字符串与多行字符串的更多相关文章
- Python入门--11--自定义函数
使用def定义自定义函数 举个栗子: def myfristFunction(): print "we are 伐木累!" #输入myfristFunction() 会输出:we ...
- Python之路,第二篇:Python入门与基础2
1,复合赋值运算符 += . -= . *= . /= . //= . %= , **= x += y 等同于 x = x + y x -= ...
- c++ string类使用及用string类解决整行字符串输入
下面随笔给出c++ string类使用及用string类解决整行字符串输入. string类 使用字符串类string表示字符串 string实际上是对字符数组操作的封装 string类常用的构造函数 ...
- Python:Base1(数据类型,print语句,变量,定义字符串,raw字符串与多行字符串,Unicode字符串,整数和浮点数运算,布尔类型运算)
1.Python中数据类型: 计算机顾名思义就是可以做数学计算的机器,因此,计算机程序理所当然地可以处理各种数值.但是,计算机能处理的远不止数值,还可以处理文本.图形.音频.视频.网页等各种各样的数据 ...
- Python入门篇-基础数据类型之整型(int),字符串(str),字节(bytes),列表(list)和切片(slice)
Python入门篇-基础数据类型之整型(int),字符串(str),字节(bytes),列表(list)和切片(slice) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Py ...
- 大爽Python入门教程 1-2 数与字符串
大爽Python入门公开课教案 点击查看教程总目录 1 整数与浮点数 整数大家都知道,比如1, 2, 10, 123, 都是整数int. 浮点数是什么呢? 上一节的除法运算,不知道有没有人注意到,其结 ...
- Python中raw字符串与多行字符串
如果一个字符串包含很多需要转义的字符,对每一个字符都进行转义会很麻烦.为了避免这种情况,我们可以在字符串前面加个前缀r ,表示这是一个 raw 字符串,里面的字符就不需要转义了.例如: r'\(~_~ ...
- python入门(9)字符串和编码
python入门(9)字符串和编码 字符串是一种数据类型,比较特殊的是字符串有一个编码问题. 因为计算机只能处理数字,如果要处理文本,就必须先把文本转换为数字才能处理. 最早的计算机在设计时采用8个比 ...
- Python入门 —— 04字符串解析
字符串 -字符串是 Python 中最常用的数据类型.(可以说是大多数语言都常用) 1. 创建字符串 ( '' 或 "" 和 '''''')(单,双和三引号)(字符串可以为空) - ...
随机推荐
- BAT-SVN自动更新代码目录
1.安装“TortoiseSVN-1.7.15.25753-x64-svn-1.7.18.msi”. 2.“运行”->“cmd”->输入“svn help”->出现用说明代表正常,提 ...
- OFFLINE
2013年9月22日 20:47:42 OFFLINE 今天没有网络,或许,只有没有网络才去做一些更加有意义的事情.人就是这么贱,不是么.或许已经有点强迫症的味道的了. 中午吃完饭有2个小时的休息时间 ...
- 【Unity/Kinect】Kinect入门——项目搭建
本文是Unity Store里的官方Demo包中的ReadMe翻译(别人翻的),介绍了用Unity如何入门搭建起一个Kinect项目工程. 非常感谢下面这位大大的无私奉献! http://www.ma ...
- 抽取、转换和装载介绍(七)管理ETL环境(待续)
数据仓库的目标之一是能够为增强业务功能提供适时的.一致的和可靠的数据. 为了达到上述目标,ETL必须按照下述三条标准不断地加以完善: 可靠性 可用性 易管理性 子系统22--作业调度器 子系统23-- ...
- ThreadStart中如何带参数
1.ThreadStart 线程执行带参数的方法,new Thread(new ThreadStart(delegate { ThreadTask(firstPage, lastPage); })); ...
- NTP原理
ntp原理与设置 原创 2016年09月17日 15:28:16 标签: ntp / 原理 / 设置 / linux / 时钟同 ...
- Entity Framework应用:Loading Entities
Entity Framework允许控制对象之间的关系,在使用EF的过程中,很多时候我们会进行查询的操作,当我们进行查询的时候,哪些数据会被加载到内存中呢?所有的数据都需要吗?在一些场合可能有意义,例 ...
- powerdesigner与mysql数据库的连接
(1).在桌面新建一个mysql.dpc文件,里面可以什么内容也没有. (2).打开powerdesigner,操作如下: (3).把mysql.dcp文件选中: (4).建立连接属性: (5).测试 ...
- (五)Qt实现自定义模型基于QAbstractItemModel
一个小例子 QTableView + QStandardItemModel QStandardItemModel model; //设置大小 model.setColumnCount(); //列 m ...
- Kafka Tools
参考, https://cwiki.apache.org/confluence/display/KAFKA/System+Tools https://cwiki.apache.org/confluen ...