The Python Tutorial
1、
>>> print('C:\some\name') # here \n means newline!
C:\some
ame
>>> print(r'C:\some\name') # note the r before the quote
C:\some\name
第一个语句中 print中没有加入r 所以 print会将字符创中的\n理解为 newline,而在第二个语句中由于加入了r,它使用了原始字符串,所以没有进行另起一行
The Python Tutorial的更多相关文章
- [Notes] Learn Python2.7 From Python Tutorial
I have planed to learn Python for many times. I have started to learn Python for many times . Howeve ...
- Python Tutorial 学习(八)--Errors and Exceptions
Python Tutorial 学习(八)--Errors and Exceptions恢复 Errors and Exceptions 错误与异常 此前,我们还没有开始着眼于错误信息.不过如果你是一 ...
- Python Tutorial 学习(六)--Modules
6. Modules 当你退出Python的shell模式然后又重新进入的时候,之前定义的变量,函数等都会没有了. 因此, 推荐的做法是将这些东西写入文件,并在适当的时候调用获取他们. 这就是为人所知 ...
- [译]The Python Tutorial#11. Brief Tour of the Standard Library — Part II
[译]The Python Tutorial#Brief Tour of the Standard Library - Part II 第二部分介绍更多满足专业编程需求的高级模块,这些模块在小型脚本中 ...
- [译]The Python Tutorial#10. Brief Tour of the Standard Library
[译]The Python Tutorial#Brief Tour of the Standard Library 10.1 Operating System Interface os模块为与操作系统 ...
- [译]The Python Tutorial#12. Virtual Environments and Packages
[译]The Python Tutorial#Virtual Environments and Packages 12.1 Introduction Python应用经常使用不属于标准库的包和模块.应 ...
- [译]The Python Tutorial#2. Using the Python Interpreter
[译]The Python Tutorial#Using the Python Interpreter 2.1 Invoking the Interpreter Python解释器通常安装在目标机器的 ...
- [译]The Python Tutorial#1. Whetting Your Appetite
[译]The Python Tutorial#Whetting Your Appetite 1. Whetting Your Appetite 如果你需要使用计算机做很多工作,最终会发现很多任务需要自 ...
- [译]The Python Tutorial#7. Input and Output
[译]The Python Tutorial#Input and Output Python中有多种展示程序输出的方式:数据可以以人类可读的方式打印出来,也可以输出到文件中以后使用.本章节将会详细讨论 ...
- [译]The Python Tutorial#8. Errors and Exceptions
[译]The Python Tutorial#Errors and Exceptions 到现在为止都没有过多介绍错误信息,但是已经在一些示例中使用过错误信息.Python至少有两种类型的错误:语法错 ...
随机推荐
- C#数组的声明方式
C#数组的五种声明方式 一.声明一个未经初始化的数组引用,以后可以把这引用初使化为一个数组实例 int[] intArray; intArray = new int[10]; 注:数组的引用必须以相同 ...
- 【转】SpringTest框架JUnit单元测试用例获取ApplicationContext实例的方法
转自:http://www.coderli.com/junit-spring-test-applicationcontext JUnit单元测试用例中使用Spring框架,直接方式如下. @RunWi ...
- UVa 11082 & 最大流的行列模型
题意: 给出一个矩阵前i行的和与前j列的和,(i∈[1,r],j属于[1,c]),每个元素ai,j∈[1,20],请你还原出这个矩阵,保证有解. SOL: 给网络流建模跪了,神一样的建图,如果我我会怎 ...
- jsp 表单提交,服务器跳转方法 浏览器重定向 及 servlet映射时 路径问题
在jsp页面中,等提交表单数据时,最好用觉得路径. 写法如下: <form action ="<%=request.getContextPath()%>/do_login. ...
- Codeforces Round #252 (Div. 2) B. Valera and Fruits
#include <iostream> #include <vector> #include <algorithm> #include <map> us ...
- Codeforces Round #228 (Div. 2) B. Fox and Cross
#include <iostream> #include <string> #include <vector> #include <algorithm> ...
- Button 设置适应不同版本 旋转以后大小相应的改变
很多时候对于不同的版本,随设备的旋转以后,相应的Button的大小如果不做相应的改变,这很影响视图的美观和布局:下面是小编的个人看法 UIButton *button = [[UIBtton all ...
- 【BZOJ】3028: 食物
http://www.lydsy.com/JudgeOnline/problem.php?id=3028 题意: 每种食物的限制如下:汉堡:偶数个:可乐:0个或1个鸡腿:0个,1个或2个蜜桃:奇数个鸡 ...
- jQuery常用方法验证
验证邮箱: $('input[data-name="email"]').keyup(function () { var em; em = $(this).val(); if (!e ...
- [zt]OpenCV如何获取视频当前的一帧图像
(OpenCV读取视频.OpenCV提取视频每一帧.每一帧图片合成新的AVI视频)CvCapture 是视频获取结构 被用来作为视频获取函数的一个参数 比如 CvCapture* cap; IplIm ...