I'm stuck with this thing (I'm a beginner in Python and it's become too complicated for me). I searched for days but never found any solution anywhere.
I have an History_string
like this:
----------------------------------------------------------------
Jeu. 17/06/2021 - 16:12:48
Sent email
----------------------------------------------------------------
Mer. 16/06/2021 - 11:34:43
meeting today
----------------------------------------------------------------
Lun. 14/06/2021 - 20:02:34
phone call today
----------------------------------------------------------------
and I would like to insert another string which contains another interaction with the customer, lets say New_interaction
:
----------------------------------------------------------------
Mar. 15/06/2021 - 17:34:45
New interaction
----------------------------------------------------------------
So basically what I'm trying to do is searching the History_string
until it founds a date less than New_interaction
and insert New_interaction
right there.
So the result would be :
----------------------------------------------------------------
Jeu. 17/06/2021 - 16:12:48
Sent email
----------------------------------------------------------------
Mer. 16/06/2021 - 11:34:43
meeting today
----------------------------------------------------------------
Mar. 15/06/2021 - 17:34:45
New interaction
----------------------------------------------------------------
Lun. 14/06/2021 - 20:02:34
phone call today
----------------------------------------------------------------
How can I achieve that?