i guess it adds / sort of concatenates the list On Tue, Aug 1, 2017 at 10:06 AM, ramakrishna reddy <rampapp...@gmail.com> wrote:
> Hi All, > > I know > > > sum([1,2,3]) returns 6. > > But sum with [] 'empty list' as second parameter returns as below. > > > sum([[1,2,3], [3,4,5]], []) returns [1, 2, 3, 3, 4, 5] > Can any one please explain this logic ? I searched in google but could not > find the suitable answer. > > Thanks in advance. > > > Thanks, > Ram. > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor