宠辱不惊,闲看庭前花开花落;去留无意,漫随天外云卷云舒。
——洪应明
1. 前言
在这个生活中处处都是大数据和人工智能的时代,总是能在各种角落看到 Python 的培训广告。我招架不住敌方的猛烈攻势,败下阵来。经过了一分钟的深思熟虑,我决定利用我的三分钟热情进行回击,从零开始自学 Python。
2. Manipulating Strings | 字符串操作
2.1 Working with Strings | 处理字符串
2.1.1 Double Quotes & Single Quotes | 双引号和单引号
Strings can begin and end with double quotes, just as they do with single quotes. One benefit of using double quotes is that the string can have a single quote character in it.
字符串可以以双引号开头和结尾,就像使用单引号一样。 使用双引号的好处之一就是字符串中可以包含单引号字符。
However, if you need to use both single quotes and double quotes in the string, you'll need to use escape characters.
但是,如果需要在字符串中同时使用单引号和双引号,就需要用到转义符了。