Answers for "pyton join lists"

10

python join list

''.join(list) # If you want to join with comma (,) then: ','.join(list)
Posted by: Guest on July-04-2020
0

how to join two lists in python

#define lists
my_list = ["a", "b"]
other_list = [1, 2]

#extend my_list by adding all the values from other_list into my list
my_list.extend(other_list)

# output: ['a', 'b', 1, 2]
Posted by: Guest on May-20-2021

Python Answers by Framework

Browse Popular Code Answers by Language