I have a variable like this:
bug = "^bug:url1.com;url2.com;url3.com;url4.com^"
And I want the end result to be like this:
bug = ["url1.com","url2.com","url3.com","url4.com"]
I tried:
#!/usr/bin/python
bug = "^bug:url1.com;url2.com;url3.com;url4.com^"
bug = bug.split(";")
print bug
But it outputs:
['^bug:url1.com', 'url2.com', 'url3.com', 'url4.com^']
Please note that the variable bug
consists of a bunch of URLs not just ordinary words, maybe with regex ? I don't know sorry I'm still new to programming, please help me fix this.