首页 > 解决方案 > python条没有返回预期结果

问题描述

在我的 python 代码中,我有一个代码可以使用以下代码获取 3 条客户列表:

import stripe
stripe.api_key = "sk_test_DftufeqrQlvZHqPdIgGmf9ro00exkHljNF"
stripe.Customer.list(limit=3)
print(stripe)

我得到的输出是:

<module 'stripe' from '/var/www/html/project/myenv/lib/python3.6/site-packages/stripe/__init__.py'>

我不知道为什么我得到这个而不是结果任何人都可以帮我解决这个问题吗?

标签: python-3.xdjangostripe-paymentspython-3.6

解决方案


如果将列表分配给变量,则可以打印它们。stripe是 Python 客户端库对象。

customers = stripe.Customer.list(limit=3)
print(customers)

或没有变量:

print(stripe.Customer.list(limit=3))

推荐阅读