0

I have a basic question about python. I want to split the data like e.g.

    [[3,5],[6, 78],[4,45]]

     3,5,6,78,4,45. 

I am using split method but is there any better way to do it ?

clouddy
  • 891
  • 2
  • 8
  • 10
  • You may use this one `a = [[3, 5], [6, 78], [4, 45]] reduce(lambda x,y:x+y, a) or [i for j in a for i in j]` – Deba Apr 11 '17 at 14:32
  • I'm not sure the marked duplicate applies to what you're trying to do, but it's difficult to tell without a more thorough description. You say "I am using split method but is there any better way to do it ?". Could you show us your code using `split`, so we can see what you're actually trying to do? – glibdud Apr 11 '17 at 14:33

0 Answers0