将变量设置为从包含变量作为返回列表的函数返回的列表似乎没有给我任何输出:
def get_wordlist(num, s):
items_in_wordlist = database_get(num)
print "Trying to get wordlist..."
print items_in_wordlist
items = []
if s == 0:
for item in items_in_wordlist:
items.append((item[1]).decode("hex"))
return items
elif s == 1:
for item in items_in_wordlist:
items.append((item[2]).decode("hex"))
return items
def get_wordlist_set(self, speed):
global main_wordlist, main_wordlist_e
print "Getting wordlist set..."
#try:
main_wordlist = get_wordlist(speed, 1)
print "Check (1) - Passed"
main_wordlist_e = get_wordlist(speed, 0)
print "Check (2) - Passed"
return main_wordlist
“检查 (*) - Passed”应打印到屏幕上。但是,我得到的只是“设置单词列表......”关于我做错了什么有什么想法吗?