Hello ,
wanted to know if there is a smart way to do the following:
this is my string
String1 = "data1!data2!data3!data4!data5.......!datax"
I want to save only after data2 :
meaning data3 until the end
String2 = "data3!data4!data5.......!datax"
Up until know I cut after the first "!"
then cut again the second "!"
then I save the new string
but maybe there is a smarter\cleaner way to do this ? ( if something I will need to get the 6th data )?
I found this:
Found the solution
can remove this post
wanted to know if there is a smart way to do the following:
this is my string
String1 = "data1!data2!data3!data4!data5.......!datax"
I want to save only after data2 :
meaning data3 until the end
String2 = "data3!data4!data5.......!datax"
Up until know I cut after the first "!"
then cut again the second "!"
then I save the new string
but maybe there is a smarter\cleaner way to do this ? ( if something I will need to get the 6th data )?
I found this:
new = string.split("!",2)which return
['data1', 'data2', 'data3!data4!data5']****
Found the solution
can remove this post