# -*- coding: UTF-8 -*-
# 作者：huanhuilong
# 标题：Python 循环1
# 描述：使用 while 遍历，打印列表信息


def test(list):
    i = 0
    while i < len(list):
        item = list[i]
        print('')
        print("## 第{}条信息".format(i))
        print("* id: {}".format(item['id']))
        print("* number: {}".format(item['number']))
        print("* title: {}".format(item['title']))
        print("* body: {}".format(item['body']))
        i += 1


if __name__ == '__main__':
    list = [
        {
            "id": 955350543,
            "number": 2337,
            "title": "Release 1.6 does not have pre-autoreconf'ed configure script",
            "body": "If you have a usage question, please ask us on either Stack Overflow (https://stackoverflow.com/questions/tagged/jq) or in the #jq channel (http://irc.lc/freenode/%23jq/) on Freenode (https://webchat.freenode.net/)."
        },
        {
            "id": 954792209,
            "number": 2336,
            "title": "Fix typo",
            "body": ""
        }
    ]

    test(list)
