推荐一本Python学习用书
-
<<Dive into Python>>写得深入浅出,非常好。
中文版: www.woodpecker.org.cn/diveintopython/
英文原版: diveintopython.org/ -
交作业,第一个python程序[code]def buildConnectionString(params):
"""Build a connection string from a dictionary of parameters.Return string.""" return ";".join(["%s=%s" % (k, v) for k, v in params.items()])
if name == "main":
myParams = {"server":"mpilgrim",
"database":"mater",
"uid":"sa",
"pwd":"secret"
}
print buildConnectionString(myParams)[/code] -
谢谢分享!