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
<pre> '2018-08-24'</pre>
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(
obtain_date(date)
), 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
obtain_date(date)
I have to put it in
obtain_events
Keep in my mind that this is a list of lists.
So my 2 functions involved are:
obtain_events()
obtain_date(date)
- obtain_date(date) goes in obtain_events()
Thanks!
What I have tried:
I've tried to use my
obtain_date(date)
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