0
I need help
I can't create this code: ask for an ip address and call a module that writes on the screen the corresponding location to which it belongs and then the other way around, asking for a location and saying the ips it has, help. this is the information: ubicacio = {'I206': ['172.16.0.1', '172.16.0.2', '172.16.0.3'], 'I210': ['172.16.1.4', '172.16.1.8', '172.16.1.5'], 'Dept1': ['172.16.0.8'], 'ARGO': ['172.16.0.100', '172.16.0.7', '172.16.0.16', '172.16.0.200'] example of how it should turn out: the IP 172.16.0.16 is in ARGO reverse: Ip of I210 172.16.1.4 172.16.1.8 172.16.1.5
3 Respostas
+ 1
Can you share what you have tried so far? it doesn't matter if it doesn't work, what matters here is that you show an attempt to try.
Save the code in SoloLearn and share the saved code link within your thread Description. Follow the guide below in case you didn't know how to share the code link 👍
https://www.sololearn.com/post/75089/?ref=app
+ 1
https://code.sololearn.com/ckzOj4lHTZ1N/#py
- 1
Perhaps this may help? (I googled "key by value python")
https://stackoverflow.com/questions/8023306/get-key-by-value-in-dictionary