Re: Tiny python code I dont understand

2016-03-08 Thread ast
"ast" a écrit dans le message de news:56defc8e$0$3341$426a7...@news.free.fr... Hello lst = [(1,2,3), (4, 5,6)] sum(lst, ()) (1, 2, 3, 4, 5, 6) Any explanations ? thx OK, sorry, I finally understand. This is because adding tuple (or list or string ...) is a concatenation () + (1,2,3) + (

Re: Tiny python code I dont understand

2016-03-08 Thread ast
"Jussi Piitulainen" a écrit dans le message de news:lf58u1t53sb@ling.helsinki.fi... ast writes: Hello lst = [(1,2,3), (4, 5,6)] sum(lst, ()) (1, 2, 3, 4, 5, 6) Any explanations ? (() + (1,2,3)) + (4,5,6) yes, ty -- https://mail.python.org/mailman/listinfo/python-list

Re: Tiny python code I dont understand

2016-03-08 Thread Jussi Piitulainen
ast writes: > Hello > lst = [(1,2,3), (4, 5,6)] sum(lst, ()) > (1, 2, 3, 4, 5, 6) > > Any explanations ? (() + (1,2,3)) + (4,5,6) -- https://mail.python.org/mailman/listinfo/python-list