【发布时间】:2011-08-16 02:41:03
【问题描述】:
我正在构建一个测试程序。它本质上是一个错误和错误修复的数据库。它可能最终成为我在 python 中工作的所有时间的整个数据库。 我想通过使用字典来创建图层效果。
这是截至 2011 年 4 月 29 日的代码:
modules=['pass']
syntax={'PRINT':''' in eclipse anthing which
you "PRINT" needs to be within a set of paranthesis''','StrRet':'anytime you need to use the return action in a string, you must use the triple quotes.'}
findinp= input('''where would you like to go?
Dir:''')
if findinp=='syntax':
print(syntax)
dir2= input('choose a listing')
if dir2=='print'or'PRINT'or'Print':
print('PRINT' in syntax)
现在当我使用它时,我得到了整个字典,而不仅仅是第一层。我该怎么做这样的事情?我需要在控制台中列出链接吗?还是有更好的方法?
谢谢, 舒前。
【问题讨论】:
-
正确格式化你的源代码!
标签: python eclipse dictionary pydev