“Combinar a las listas de Python” Código de respuesta

Combinar la lista de listas Python

x = [["a","b"], ["c"]]

result = sum(x, [])
# This combines the lists within the list into a single list
Troubled Thrush

Combinar a las listas de Python

listone = [1,2,3]
listtwo = [4,5,6]

joinedlist = listone + listtwo
Cook's Tree Boa

Combinar dos listas Python

listone = [1, 2, 3]
listtwo = [4, 5, 6]

joinedlist = listone + listtwo
Pleasant Panda

fusionar dos listas Python

# list1 = [1, 2, 3] 
# list2 = [4, 5]
# new_list = [1, 2, 3, 4, 5]

new_list = list1.extend(list2)
Tense Tarantula

Respuestas similares a “Combinar a las listas de Python”

Preguntas similares a “Combinar a las listas de Python”

Más respuestas relacionadas con “Combinar a las listas de Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código