You can do key, value in dicData.items() BTW. Instead of key.info2, do dicData[key] or value. Also, avoid mixedCaseNaming in Python. We prefer names_with_underscores. And use better variable names, I guess
does this code work
if I were you i would do this instead for item in dicData: print('{} -> {}'.format(item, dicData[item]) for num in dicData['info2']: print(num)
Обсуждают сегодня