摘要:
Python与JSON(load、loads、dump、dumps) 1.Python中加载JSON 使用loads(string):作用将string类型转为dict字典或dict链表 # 加载配置,configuration_path:配置文件路径 def load_conf(configura 阅读全文
摘要:
url() 函数看起来的格式象:url(r^/account/$', views.index, name=index),它可以接收四个参数,分别是两个必选参数:regex、view 和两个可选参数:kwargs、name,接下来详细介绍这四个参数。 regexregex 代表一个正则表达式,凡是与 阅读全文
摘要:
join函数是一个字符串操作函数 str.join(item)str表示字符串(字符),item表示一个成员,注意括号里必须只能有一个成员,比如’,’.join(‘a’,‘b’)这种写法是行不通的 举个例子:‘,’.join(‘abc’)上面代码的含义是“将字符串abc中的每个成员以字符’,'分隔开 阅读全文