Here's the return of my function:
[['Musique', 'Shawn Phillips', '2018-08-24', '2018-08-24'], ['Musique', "L'avenue Royale fête l'été!", '2018-08-25', '2018-08-25'], ['Musique', 'Perséides musicales', '2018-08-03', '2018-08-03']
I have to use a loop to i can search all those index and replace all date like
to an int and then replace all of those date with the int.
Now, the other function that i need to put in this one is actually the function thats returns the int(
), this one actually works. So now im having a hard time using this function in the initial one so i can use a loop with it (im assuming) to replace all str of my date into int.
So the function that works is called
I have to put it in
Keep in my mind that this is a list of lists.
So my 2 functions involved are:
- obtain_date(date) goes in obtain_events()
What I have tried:
I've tried to use my
in a loop like this:
year = '2018'
for liste in my_liste: #to reach my global list
for element in liste: # to reach every lists in my list
if year in element: #using '2018' as its in every str i modify
element[5:] = obtain_date(date) #[5:] = str after '2018