On Thursday, January 23, 2014 9:57:02 AM UTC+2, indar kumar wrote: > On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote: > I just need to print first element of tuple not the whole
in hierarchies do steps level by level, that will make things much easier: hosts={'PC2':['02:02:02:02:02:02', '192.168.0.2', '200', {'192.168.0.2': ('02:02:02:02:02:02', 1390461798.531)}], 'PC1':['01:01:01:01:01:01', '192.168.0.1', '200', {'192.168.0.2': ('02:02:02:02:02:02', 1390461798.531), '192.168.0.1': ('01:01:01:01:01:01', 1390461787.78)}]} print(hosts['PC2']) print(hosts['PC2'][3]) print(hosts['PC2'][3]['192.168.0.2']) print(hosts['PC2'][3]['192.168.0.2'][1]) -- https://mail.python.org/mailman/listinfo/python-list