摘要:
Python 本身没有“break n” 和“goto” 的语法,这也造成了Python 难以跳出多层(特定层数)循环。下面是几个跳出多层(特定层数)循环的tip。 1、自定义异常 class getoutofloop(Exception): pass try: for i in range(5): 阅读全文
posted @ 2016-02-17 14:53
xiaojiayu
阅读(12318)
评论(0)
推荐(0)
摘要:
#json string:s = json.loads('{"name":"test", "type":{"name":"seq", "parameter":["1", "2"]}}')print sprint s.keys()print s["name"]print s["type"]["name 阅读全文
posted @ 2016-02-17 14:48
xiaojiayu
阅读(59916)
评论(0)
推荐(2)