一、Python代码缩进
Python 函数没有明显的 begin 和 end ,没有标明函数的开始和结束的花括号。唯一的分隔符是一个冒号 ( : ),接着代码本身是缩进的。
例如:缩进 buil dCon necti onStr ing 函数
1
2
3
4
|
def
buildConnectionString(params):
"""Build a connection string from a dictionary of parameters.
Returns string."""
return
";"
|