如何在 Py-trello 中打印 "List Done" 列表中的所有卡片?
How can I print all cards from "List Done" list in Py-trello?
我已经编写了 returns 包含所有 trello 卡片的数组的函数:
def get_cards_from_board(my_board_1):
T = []
lists = my_board_1.list_lists()
for l in lists:
cards = l.list_cards()
for c in cards:
assert isinstance(c, object)
T.append(c)
return T
但我想 return/print 所有已经完成的 trello 卡片,换句话说,所有 trello 卡片都来自一个列表 - 。我该怎么做?
我自己找答案:
def get_cards_from_board(my_board_1):
T = []
lists = my_board_1.list_lists()
for l in lists:
if l.name == 'Done':
cards = l.list_cards()
for c in cards:
assert isinstance(c, object)
T.append(c)
return T
我已经编写了 returns 包含所有 trello 卡片的数组的函数:
def get_cards_from_board(my_board_1):
T = []
lists = my_board_1.list_lists()
for l in lists:
cards = l.list_cards()
for c in cards:
assert isinstance(c, object)
T.append(c)
return T
但我想 return/print 所有已经完成的 trello 卡片,换句话说,所有 trello 卡片都来自一个列表 - 。我该怎么做?
我自己找答案:
def get_cards_from_board(my_board_1):
T = []
lists = my_board_1.list_lists()
for l in lists:
if l.name == 'Done':
cards = l.list_cards()
for c in cards:
assert isinstance(c, object)
T.append(c)
return T