+ 5
Extend method takes an iterable and adds each element from that iterable to the end of the list. a= [1,2,3,4] b= [5,6,7,8] a.extend(b) # [1,2,3,4,5,6,7,8] Append just adds whatever you pass as an argument to the end of the list. a.append(b) #[1,2,3,4,[5,6,7,8]] note that it's added entire list rather than each of its elements.
12th Apr 2019, 6:48 PM
Шащи Ранжан
Шащи Ранжан - avatar