fork download
  1. list1 = [1, 2, 3]
  2. list2 = [4, 5, 6]
  3.  
  4. list1.extend(list2)
  5. print("Joined using .extend():", list1)
  6. # Output: [1, 2, 3, 4, 5, 6]
  7.  
Success #stdin #stdout 0.03s 9520KB
stdin
Standard input is empty
stdout
Joined using .extend(): [1, 2, 3, 4, 5, 6]