I have a type string "SAB_bARGS_D". I want the string to be divided by a list of characters, but whenever there is a _ sign, the next character is added to the previous one.
So the answer above should be ['S','A','B_b','A','R','G','S_D']
This can be done using a for loop that goes through the list, but there is a built-in function that I can use .....
Thank you so much
Refresh
Hello everybody
Thanks Robert Rossney, aaronasterlingI got the required answer, but I have exactly the same question that I’m going to ask here only ... Lets say that now my line has criticism, that it can have a letter or a letter followed by _ and a number ..... How can I separate the line in the list now ... The proposed solutions cannot be used now, since S_10 will be divided into S_1 and 0 ...... It would be useful if someone could say how do it using RE .... thanks a lot ....
user506710
source
share