How to extend a list in Python

1 Answer

0 votes
lst = [1, 2, 3]

lst.extend([4, 5])

print(lst)
 
 
'''
run:
  
[1, 2, 3, 4, 5]
 
'''

 



answered Nov 7, 2018 by avibootz

Related questions

...