0

I have a string looking like this:

obj = "<dnvirnfgvireg>hellothere<akdnefbuebuf>"

and I want to split it, getting only "hellothere". The "hellothere" is not the same every time and due to this I cannot specify how it looks like.

  • If the is everytime the same, you should remove the n number of characters (str[n:]) because one day, the string "" will be in your "hellothere" string an it will cause a problem. You can do the same thing for the second <> – Clement B Nov 24 '17 at 10:24
  • This question is different from the marked duplicate. – Srinivas Reddy Thatiparthy Nov 24 '17 at 10:24
  • How do I remove them? By using replace? I tried this like: `line.replace(line[:25], '')`, but when I print the line nothing is replaced. –  Nov 24 '17 at 13:58

0 Answers0