I am new to Python ..
I am able to generate the following output by comparing two dictionaries with dictdiffer and it is in oo variable:
oo = ('remove', '', [('we are here to help you improve your skills', [['2021-04-09', 'email@example.com', 'we are here to help you improve your skills', 'Delivered']]), ('(1st meeting) here is our recorded presentation skills webinar', [['2021-04-12', 'email@example.com', '(1st meeting) here is our recorded presentation skills webinar', 'Delivered']]), ('YOU ARE INVITED TO THIS PROGRAMMING EVENT', [['2021-04-13', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered'], ['2021-04-16', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered']])])
('remove', '', [('we are here to help you improve your skills', [['2021-04-09', 'email@example.com', 'we are here to help you improve your skills', 'Delivered']]), ('(1st meeting) here is our recorded presentation skills webinar', [['2021-04-12', 'email@example.com', '(1st meeting) here is our recorded presentation skills webinar', 'Delivered']]), ('YOU ARE INVITED TO THIS PROGRAMMING EVENT', [['2021-04-13', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered'], ['2021-04-16', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered']])])
('remove', '', [('we are here to help you improve your skills', [['2021-04-09', 'email@example.com', 'we are here to help you improve your skills', 'Delivered']]), ('(1st meeting) here is our recorded presentation skills webinar', [['2021-04-12', 'email@example.com', '(1st meeting) here is our recorded presentation skills webinar', 'Delivered']]), ('YOU ARE INVITED TO THIS PROGRAMMING EVENT', [['2021-04-13', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered'], ['2021-04-16', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered']])])
I would like to access the lists within this tuple, with an output like:
['2021-04-09', 'email@example.com', 'we are here to help you improve your skills', 'Delivered']
['2021-04-12', 'email@example.com', '(1st meeting) here is our recorded presentation skills webinar', 'Delivered']
['2021-04-13', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered']
......
......
What I did so far is simply looping by index value:
for tuple in enumerate(oo):
for list in tuple[1]:
for activity in list:
print(activity[0])
However the output is with random letters and not every list (starting with date) is there!:
r
e
m
o
v
e
w
['2021-04-09', 'email@example.com', 'we are here to help you improve your skills', 'Delivered']
(
['2021-04-12', 'email@example.com', '(1st meeting) here is our recorded presentation skills webinar', 'Delivered']
Y
['2021-04-13', 'email@example.com', 'YOU ARE INVITED TO THIS PROGRAMMING EVENT', 'Delivered']
How can I arrange lists and able to retrieve them from this multi tuple variable?