Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. for s in string:
  2. new_string.append(s.split("--"))
  3.  
  4. string = ["12345--ABC-1234--This is test", "12346--ABC-1234--This is test", "22222--BCD-4321--Another one"]
  5.  
  6. Expected output: new_string = ["22222--BCD-4321--Another one", "12346--ABC-1234--This is test"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement