0

List affectation

Hi. how can we add different elements to a list without using any method . like: a,v,c=l (but this one doesn't work)

14th Jun 2017, 10:22 PM
Alluka Smile
Alluka Smile - avatar
1 Answer
+ 5
Say you have a list: mylist = [ 42, 256, 8 ] You can use 'plus' (+) operator to concatenate another list: mylist = mylist + [ 7, 11, 13 ] ... or shortener, with a unique element list: myist += [ 3 ]
14th Jun 2017, 10:30 PM
visph
visph - avatar