08-16-2022 06:41 AM
Hi We have several ip address like below. and hope to change ip address list style like
10.0.0.1, 10.0.0.3, 10.0.0.9-10, 10.0.0.100, 10.0.1.1-10.0.1.3
We hope these ip address are listed like below using python. Anyone can help show its commands? Thank you
10.0.0.1,
10.0.0.3,
10.0.0.9,
10.0.0.10,
10.0.0.100,
10.0.1.1,
10.0.1.2,
10.0.1.3
Solved! Go to Solution.
08-16-2022 09:34 AM
You can capture that information to input and sort as below :
08-16-2022 09:13 AM
Hello,
I honestly have no idea what you are after. What is the context of your question ? What are you trying to accomplish ? Elaborate so we can understand what you are asking...
08-16-2022 09:21 AM - edited 08-16-2022 09:23 AM
@Georg Pauwen Thanks Georg for your reply. We have a lot devices which are monitored by two servers, server 1 and server2. ip address in server 1 is expressed like 10.0.0.9-10, and ip address in server2 is expressed like 10.0.0.9 and 10.0.0.10. We want to compare two group of ip address to try to know if there are duplicate ip address, so we have to use same style of ip address expression to compare. that is why we need to change 10.0.0.9-10 into 10.0.0.9, 10.0.0.10 using python.
08-16-2022 08:38 AM
Hi We have several ip address like below. and hope to change ip address list style like
10.0.0.1, 10.0.0.3, 10.0.0.9-10, 10.0.0.100, 10.0.1.1-10.0.1.3
We hope these ip address are listed like below using python. Anyone can help show its commands? Thank you
10.0.0.1,
10.0.0.3,
10.0.0.9,
10.0.0.10,
10.0.0.100,
10.0.1.1,
10.0.1.2,
10.0.1.3
08-16-2022 09:34 AM
You can capture that information to input and sort as below :
08-16-2022 09:39 AM - edited 08-16-2022 09:40 AM
@balaji.bandi Thanks for your info. ip address is like this 10.0.0.1-3.
can we do it like this?
IP = ['10.0.0.1-3' , '10.0.1.10']
08-16-2022 12:18 PM
10.0.0.1-3 (in this case you looking )
10.0.0.1
10.0.0.2
10.0.0.3
you need to create another logic to process this.
if you looking :
10.0.0.1-3
10.0.0.10
then same should work.
08-16-2022 02:46 PM
Thank you balaji
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide