Jul-02-2019, 02:29 PM
What are you trying to do. Put a comma at the end of each element?
>>> [f'{element},' for element in d] ['apple,', 'banana,', 'tofu,', 'cat,']
Recommended Tutorials: