Python notes
shpeacelover
posted @ 2014年4月20日 01:23
in Python
, 408 阅读
1. Backslash ( \ ) continues a line. Semicolon ( ; ) joins two statements on a line.
2. Python special underscore identifiers:
a. _xxx Do not import with 'from module import *'
b. __xxx__ System-defined name.
c. __xxx Request private name mangling in classes.
3. Learn the use of lambda.
4. Variables defined within a function have local scope, and those at the highest level in a module have global scope.
5. How to specify a utf-8 file:
# -*- coding: UTF-8 -*-
blog comments powered by Disqus