Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string manipulation
#1
Hi,

I have a string like so: string = "27.116.56.0 27.116.59.255 43.230.209.0 43.230.209.255"

how would you go from it to this format: string = "27.116.56.0-27.116.59.255,43.230.209.0-43.230.209.255"

any easy way doing that?

thanks,
Joe
Reply
#2
That is in every beginner's tutorial like https://www.pythonforbeginners.com/conca...-in-python Also see the tutorials at Python's wiki https://wiki.python.org/moin/BeginnersGuide/Programmers
Reply
#3
It will be more helpful with an example..

the problem is bigger then this two ranges..
Reply
#4
Post an example and we will help you with any problems.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  IP string manipulation problem TheRealNoob 12 7,313 Feb-04-2019, 09:29 AM
Last Post: perfringo
  Very Basic String Manipulation gstu 2 2,670 Mar-18-2018, 03:08 PM
Last Post: gstu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020