Thanks for reply.
I am running file via ctrl+F11 and seeing output on pyDev Console. My code has
got nested dictionaries, lists and tuples. What you want to see?
--
https://mail.python.org/mailman/listinfo/python-list
I am using Pydev 2.8 on Eclipse IDE. It is printing some values that haven't
been printed with print command. How to deal with this problem?
--
https://mail.python.org/mailman/listinfo/python-list
ThanK you. It solved my problem.
Can someone tell me how can i print particular value inside list of key.
I know how to print J['PC2'][1] means will print IP. but I want the user to
input some element and I will print element just before that element.
e.g. if user inputs 192.168.0.2, program wil
I have programming course and trying to learn things. This is of no human use.
I am just following exercises. Just have to do steps as asked.
--
https://mail.python.org/mailman/listinfo/python-list
@Peter Otten:
I have lists for keys. What I want is if host already exists it would overwrite
otherwise add to database. And if host doesn't exist it will first add this
host to database and then compare its IP with IPs of rest of hosts. If ip
matches with any of the other hosts, it will delete
z={ 'PC2': ['02:02:02:02:02:02', '192.168.0.2', '200'],
'PC3': ['03:03:03:03:03:03', '192.168.0.3', '200'],
'PC1': ['01:01:01:01:01:01', '192.168.0.1', '200'] }
My solution:
z=raw_input("Enter Host, Mac, ip and time")
t=z.split()
t[0]=z[1:]
for key in dic:
if t[2] in dic[key]: