0

I want to conver a nested list to str. i am using for loop and ','.join method. but how t can be acheived in a effective way

input= [[[[['a', 'b'], 'c'], 'd'], 'e'], 'f']
output = a,b,c,d,e,f 
Rana
  • 1
  • 1
  • 1
    Use `",".join(flattened_list)`. Checkout how to flatten a nested list [here](https://stackoverflow.com/questions/2158395/flatten-an-irregular-list-of-lists) – Ch3steR Apr 29 '22 at 13:41

0 Answers0