+ 1

How to concat lists in Python?

Help me

17th Oct 2020, 3:06 AM

4 Respostas
+ 3
a=[2,4,5] b=[5,6,7] print(a+b)
17th Oct 2020, 3:14 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
I think the answer is `a + b` but I am not sure.
17th Oct 2020, 3:06 AM

0
C
17th Oct 2020, 3:07 AM

0
# You can use the extend method: list0 = [1, 2, 3] list1 = [4, 5, 6] list0.extend(list1) print(list0)
17th Oct 2020, 10:40 AM
QTWizard