相关疑难解决方法(0)

Python的标准库 - 是否存在平衡二叉树的模块?

在Python的标准库中是否有AVL或Red-Black模块或其他类型的平衡二叉树?我试图找到一个,但没有成功(我对Python比较新).

python tree standard-library

65
推荐指数
5
解决办法
3万
查看次数

使用类属性访问字典

现在我正在使用python.关于dict的一个问题....假设我有一个字典

config = {'account_receivable': '4', 'account_payable': '5', 'account_cogs': '8', 'accoun
t_retained_earning': '9', 'account_income': '6', 'account_expense': '31', 'durat
ion': 2, 'financial_year_month': 9, 'financial_year_day': 15, 'account_cash': '3
', 'account_inventory': '2', 'account_accumulated_depriciation': '34', 'account_
depriciation_expense': '35', 'account_salary_expense': '30', 'account_payroll_pa
yable': '68', 'account_discount': '36', 'financial_year_close': '2008-08-08'}
Run Code Online (Sandbox Code Playgroud)

如果print - > config ['account_receivable']它将返回其对应的值4

但我希望通过这种方式访问​​它 - > config.account_receivable,然后它将返回相应的值

我怎么能实现这个??? 如果有人可以请帮助我

BR //纳兹穆尔

python dictionary

4
推荐指数
2
解决办法
2521
查看次数

标签 统计

python ×2

dictionary ×1

standard-library ×1

tree ×1