On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
> Hi,
> 
> 
> 
> I want to show a code for review but afraid of plagiarism issues. Kindly, 
> suggest how can I post it for review here without masking it visible for 
> public

Thanks for kind help.

I have following nested dictionary

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)}]}


How can I print a particular tuple from this table?


What I am trying to do is
input1=raw_input("Please enter id of host and IP that you want to be resolved")
z=input1.split()
print("PC3 resolved"+' '+z[1]+' to'+hosts[z[0]][3] z[1])

#z[1] is ip entered and [z[0]][3] z[1] is the particular location of value(MAC) 
associated with IP that I want to print.


But failed to do so. How can I print that. Please guide
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to