pythonchallenge_level5

level5

地址:http://www.pythonchallenge.com/pc/def/peak.html
源码:git@code.aliyun.com:qianlizhixing12/PythonChallenge.git。
问题:使用pickle对象观察打印。

#!/usr/bin/env python3
# -*- coding:UTF-8 -*-

# Level 5

import urllib.request

url = "http://www.pythonchallenge.com/pc/def/banner.p"
response = urllib.request.urlopen(url)
body = response.read()
response.close

import pickle

obj = pickle.loads(body)
for subobj in obj:
    for (x, y) in subobj:
        print(x * y, end="")
    print("\n")
上一篇:Python | 7招教你识别一个网站是否是Django后台


下一篇:redux 中间件 --- applyMiddleware 源码解析 + 中间件的实战