码迷,mamicode.com
首页 > 编程语言 > 详细

Meet Python: little notes

时间:2016-05-21 11:24:44      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

Source: http://www.liaoxuefeng.com/

 

? Escape character: ‘\‘

- ‘\n‘: newline;

- ‘\t‘: tab;

- ‘\\‘: \;

- r‘...‘: no transferring for contents within single quotes;

- ‘‘‘...‘‘‘: multiple lines within triple quotes: could start a new line with ENTER directly. r‘‘‘...‘‘‘ is valid as well.

 

? Division

- ‘/‘: floating point calculation, alway return float;

- ‘//‘: only return integer part (decimal part is direclty abandoned);

- ‘%‘: return remainder.

Meet Python: little notes

标签:

原文地址:http://www.cnblogs.com/minks/p/5514197.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!