How to sort?

Good afternoon everyone .Please please tell me .There is a variable called mass
it prints [[1, {'text': 'Click', 'date': 1463565243, 'from_id': 0000001, 'uid': 0000001, 'can_edit': 1, 'cid': 1698}]]
As the text parameter with the contents of the text 'Click' to bring in a separate variable ?
July 9th 19 at 13:24
2 answers
July 9th 19 at 13:26
Solution
mass = [[1, {'text': 'Click', 'date': 1463565243, 'from_id': 1, 'uid': 1, 'can_edit': 1, 'cid': 1698}]]
mass[0][1]['text']
>>> 'Click'
# In the variable s is just a string 'CLick' 
s = mass[0][1]['text']
# Either create a new dictionary with a key of 'text' and value 'Click'
d = {}
d['text'] = mass[0][1]['text']
d
>>> {'text': 'Click'}
Thank you - Judah_Bartoletti commented on July 9th 19 at 13:29
July 9th 19 at 13:28
my_var = mass[0][1]['text']
Thank you - Judah_Bartoletti commented on July 9th 19 at 13:31

Find more questions by tags IDLE IDEPyCharmPython