# from Urllib Import request
#
# F=request.urlopen ("http://123.178.101.29:81/xs_main.aspx?xh=201512102028")
#
# RESULT=STR (F.read (), encoding= ' gb2312 ')
# Print (Result)
#json. Loads used to convert a dictionary, a list, a tuple form string, to a corresponding amount dictionary, a list, a tuple
#利用json把字符串变成字典
# s= ' {"name": "Guo", "Age": 18} '
# import JSON
# result=json.loads (s)
# Print (Result,type (result))
#把字符串改成列表
# l= ' [11,22,33,44] '
# import JSON
# result=json.loads (L)
# Print (Result,type (result))
#json. Loads () function is to convert a string into a python base data type
#json. Dumps () function is to convert the basic type of Python to a string
# lists=["Alex", "Guo", "Xiaolu"]
# import JSON
# s=json.dumps (lists)
# print (s)
#json = string (content is list, tuple, dictionary form)
#http请求相应内容字符串
#json. Load () reads content from a file
#json. Dump () converts the dictionary into a file
# import JSON
# dic={' K1 ': 123, ' K2 ': 23}
# S=json.dump (Dic,open (' db ', ' W '))
# print (s)
# import JSON
# r=json.load (Open (' db ', ' r '))
# Print (R,type (R))
#会把元组转换为列表输出
n= (11,22,33,44, ' alexf ')
Import JSON
S=json.dumps (N)
Print (s)
JSON sequence of Python