python-3.x - 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'>
我不知道为什么我得到这个而不是结果任何人都可以帮我解决这个问题吗?
解决方案
如果将列表分配给变量,则可以打印它们。stripe
是 Python 客户端库对象。
customers = stripe.Customer.list(limit=3)
print(customers)
或没有变量:
print(stripe.Customer.list(limit=3))
推荐阅读
- llvm - 单片链接时优化是否适用于静态库?
- google-chrome-devtools - 网络选项卡显示在页面加载期间,40 毫秒到 120 毫秒之间没有任何反应,但它会继续加载内容
- python - 对于这个价格弹性问题,我如何在 Pyomo 中实施需求约束?
- python - 抓取每个 eBay 列表的有效方法
- c# - 在第三方类上实现自定义哈希码
- javascript - 在 ReactJS 项目中处理 CSS 的准则是什么?
- ios - 如何创建带有图像的 UIScrollView?
- reactjs - 使用 Navbar 和 LinkContainer 的动态链接
- git - 如何仅从父分支推送新更改
- kotlin - 是否有从某个位置在 ArrayList 中搜索的功能?