首页 > 编程语言 > 详细

Meet Python: little notes

时间:2016-05-21 11:22:25      阅读:186      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!