I have a several list with in a dictionary. How do I add quotes around every element in each list?
native_american={
"A2" : ["Native, Eskimo Volodko, Apache, Mexico, Central America, Guarani, Rio das Cobras, Katuana, Poturujara, Surui, Waiwai, Yanomama, Zoro, Arsario, Cayapa, Kogui, Inupiat, Lauricocha"],
"A2a" : ["Aleut, Eskimo, Apache, Siberian Eskimo, Chukchi, Dogrib, Innuit, Naukan Na-Dene, Chukchis, Athabaskan"],
"A2b" : ["Paleo Eskimo"]}
I would like it to look like....
"Native", "Eskimo Volodko", "Apache", "Mexico"
native_american = {key: value[0].split(',') for key, value in native_american.items()}
What you have at the moment is a list of one long string. This splits it into a list of many smaller strings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With