I want to extract strings with full names after 'display': while removing the braces {} within the list.
Here is some data:
[{'display': 'Max Aarons', 'first': 'Max', 'last': 'Aarons'},
{'display': 'Abdul Rahman Baba', 'first': 'Abdul Rahman', 'last': 'Baba'},
{'display': 'Tammy Abraham', 'first': 'Tammy', 'last': 'Abraham'},
{'display': 'Che Adams', 'first': 'Che', 'last': 'Adams'},
{'display': 'Adrián', 'first': 'Adrián', 'last': 'San Miguel del Castillo'}]
I have tried using split after look at some articles:
[it.split for it in x['display']]
gives the error:
TypeError: list indices must be integers or slices, not str
I must be approaching this wrongly - any help would be appreciated!
Expected output:
['Max Aarons', 'Abdul Rahman Baba', 'Che Adams', 'Adrian San Miguel del Castillo']