By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,773 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,773 IT Pros & Developers. It's quick & easy.

How to access the values from a dictionary

P: 2
Below is the dictionary

Expand|Select|Wrap|Line Numbers
  1. {0: ['Test logname : DISK$REGRES:[VERIFICATION.ACC]ACC_diff.log\n'], 
  2. 1: ['FACILITY : ACC\n', 
  3. 'FAILED LOGINACCOUNTINGTST\n', 'Total : 42\n', 'Passed : 41\n', 
  4. 'Failed : 1\n', 
  5. 'Not Run : 0\n', '\n', 
  6. 'Test logname : DISK$REGRES:[VERIFICATION.BACKUP]BACKUP_diff.log\n'], 
  8. '
  10. 'Total : 34\n', 
  11. 'Passed : 32\n', 
  12. 'Failed : 2\n', 
  13. 'Not Run : 0\n', '\n']}
Oct 18 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 5K+
P: 5,397
You might want to follow the entire tutorial located at this website (that's what I'm doing :) ). This url links to the dictionary
Oct 18 '12 #2

Expert 100+
P: 391
Weird question. You would get far better help if you actually asked the question properly.

Typically the dictionary is assigned to a variable, and the values can be accessed through the key. In the case the values are lists, which in turn can be accessed through an index.

Suppose the dictionary you give above was assigned to the variable weirdDict.

Expand|Select|Wrap|Line Numbers
  1. >>weirdDict[2][0]
In general, better to tell us what you're trying to do.
Oct 27 '12 #3

Expert Mod 5K+
P: 5,397
That is why I linked OP to the tutorial.
Oct 27 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.