No tienes acceso a esta clase

¡Continúa aprendiendo! Únete y comienza a potenciar tu carrera

No se trata de lo que quieres comprar, sino de quién quieres ser. Aprovecha el precio especial.

Antes: $249

Currency
$209

Paga en 4 cuotas sin intereses

Paga en 4 cuotas sin intereses
Suscríbete

Termina en:

14 Días
20 Hrs
24 Min
19 Seg

Playgrounds: Multiplica todos los elementos por dos

22/44

Aportes 302

Preguntas 7

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad?

Esta es la solución que realice:

def multiply_numbers(numbers):
    # Escribe tu solución 👇
    result = list(map(lambda number: number * 2, numbers))
    return result

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)

Perdí una vida, y aunque los primeros minutos no entendía porque. Quite los corchetes al valor que se retorna. Volví a correr las pruebas y afortunadamente las aprobé todas:

def multiply_numbers(numbers):
    # Escribe tu solución 👇
    new_list = list(map(lambda x : x * 2, numbers))
    return new_list

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)

Retorne una list comprehension y me ahorre una linea.

def multiply_numbers(numbers):
    return [x for x in list(map(lambda i: i*2, numbers))]

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)
numbers = [1, 2, 3, 4]
response = list(map(lambda x: x*2, numbers))
print(response) 

La libertad que nos da Python para hacer funciones donde queramos es increíble, si quieren, no tienen que hacer nada mas que esto en la linea 3 y con eso, esta solucionado.

return list(map(lambda number: number * 2, numbers))

Siento que esta respuesta es buena por la inmutabilidad

def multiply_numbers(numbers):
    new_list = numbers.copy();
    return list(map(lambda x :x*2,new_list))

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(numbers)
print(response)


no me pasaba las pruebas porque no le quitaba los [] en return

Yo escribí esta solución mas corta utilizando list comprehension, en mi VS Code funciona pero acá no 😦

numbers = [1, 2, 3, 4]
response = [number * 2 for number in numbers]
print(response

def multiply_numbers(numbers):
# Escribe tu solución 👇
return list(map(lambda i: i * 2, numbers))


me tarde un rato por que no sabia si teniamos que hacer solo la lista que ya estaba escrita o tambien los ejemplos, aun que estoy orgulloso es la primera vez que lo hago sin ver los aportes xd

Se puede resolver esto en un linea (3 contando el print y la lista inicial)

numbers = [1, 2, 3, 4]
response = list(map(lambda number: number*2, numbers))
print(response)

El Playground no me permitió realizar la ejecución 🙁 pero aquí está mi solución 😁

def multiply_numbers(numbers):
  # Escribe tu solución 👇
  result = list(map(lambda x: x * 2, numbers))
  return result
  
numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)

logrado, se puede hacer el return en una linea pero a mi me gusta siempre guardar en variable 😃

def multiply_numbers(numbers):
    # Escribe tu solución 👇
    multipli= list(map(lambda num:num*2,numbers))
    return multipli

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)

Yo resolvi asi los 2 ejercicios que venian en la guia.

  • En el ejemplo 1, multiplique la lista por 2.
  • En ejemplo 2, cree una nueva lista, la multiplique por la lista que estaba en la guia ejemplo 2.
#Solucion ejemplo 1
def multiply_numbers_v1(numbers):
    # Escribe tu solución 👇
    list_items = list (map(lambda i: i * 2, numbers))
    return list_items


numbers = [1, 2, 3, 4]
response = multiply_numbers_v1(numbers)
print(response)


#Solucion ejemplo 2
def multiply_numbers_v2(numbers_v1, numbers_v2):
    list_items = list (map(lambda x, y: x * y, numbers_v1 ,numbers_v2))
    return list_items


numbers_v1 = [1, 1, -2, -3]
numbers_v2 = [1, 1, 2, 2]
response = multiply_numbers_v2(numbers_v1, numbers_v2)
print(response)
![](https://static.platzi.com/media/user_upload/image-32da3542-431e-4004-913c-85bff578546f.jpg)
def multiply\_numbers(numbers): \# Usamos map con una función lambda para multiplicar cada número por 2 return list(map(lambda x: x \* 2, numbers)) numbers = \[2, 4, 5, 6, 8] response = multiply\_numbers(numbers) print(response) \# Output: \[4, 8, 10, 12, 16] numbers = \[1, 1, -2, -3] response = multiply\_numbers(numbers) print(response) \# Output: \[2, 2, -4, -6]
```js def multiply_numbers(numbers): # Escribe tu solución 👇 result = list(map(lambda number: number*2, numbers)) return result numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
```python def multiply_numbers(numbers): # Escribe tu solución 👇 result = list(map(lambda i : i * 2, numbers)) return result numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    result = list(map(lambda i : i \* 2, numbers))    return result numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
```js def multiply_numbers(numbers): return list(map(lambda number:number * 2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    return list(map(lambda number:number \* 2, numbers)) numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
```js numbers = [1, 2, 3, 4] def multiply_numbers(numbers): numbers_v2 = list(map(lambda i:i*2,numbers)) return numbers_v2 response = multiply_numbers(numbers) print(numbers) print(response) ```numbers = \[1, 2, 3, 4]def multiply\_numbers(numbers):     numbers\_v2 = list(map(lambda i:i\*2,numbers))    return numbers\_v2 response = multiply\_numbers(numbers)print(numbers)print(response)
Esta es mi solución😎: ![](https://static.platzi.com/media/user_upload/image-a0266cd1-4153-41bc-8edc-20c4e3132f71.jpg)
```python def multiply_numbers(numbers): # Escribe tu solución 👇 result = list(map(lambda item : item * 2, numbers)) return result numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers): # Escribe tu solución 👇 result = list(map(lambda item : item \* 2, numbers)) return result numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
**Hice 2 soluciones para el desafio:** ```python # lambda y map multiply_numbers = lambda numbers: list(map(lambda number: number * 2, numbers)) # lambda y list comprehension multiply_numbers = lambda numbers: [number * 2 for number in numbers] ```
Mi solución ```js def multiply_numbers(numbers): # Escribe tu solución 👇 numbers = list(map(lambda x : x * 2, numbers)) return numbers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
```js def multiply_numbers(numbers): return list(map(lambda number:number*2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```Este es mi código: def multiply\_numbers(numbers):    return list(map(lambda number:number\*2, numbers)) numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
Esta es mi solución ```python def multiply_numbers(numbers): numbers = list(map(lambda x: x * 2, numbers)) return numbers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
```python def multiply_numbers(numbers): # Escribe tu solución 👇 response = list(map( lambda i: i*2, numbers)) return response numbers = [1, 2, 3, 4] response= multiply_numbers(response) print(response) ```Siento que se podía resolver mas fácil como: ```python numbers = [1, 2, 3, 4] response = list(map( lambda i: i*2, numbers)) print(response) ```
![](https://static.platzi.com/media/user_upload/imagen-bb7d99ed-8c59-4f35-8641-23bee91ca362.jpg)
aqui mi solucion: ```js def multiply_numbers(numbers): # Escribe tu solución 👇 new_numers = list (map(lambda x:x*2, numbers)) return new_numers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
Si tilin ```js def multiply_numbers(numbers): # Escribe tu solución 👇 listNumbers = numbers.copy() doubleNumbers = list(map(lambda number: number*2,listNumbers)) return doubleNumbers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    listNumbers = numbers.copy()    doubleNumbers = list(map(lambda number: number\*2,listNumbers))    return doubleNumbers numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
Si tilin def multiply\_numbers(numbers):    # Escribe tu solución 👇    listNumbers = numbers.copy()    doubleNumbers = list(map(lambda number: number\*2,listNumbers))    return doubleNumbers numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)```js def multiply_numbers(numbers): # Escribe tu solución 👇 listNumbers = numbers.copy() doubleNumbers = list(map(lambda number: number*2,listNumbers)) return doubleNumbers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
en mi lógica primero puse un for number in numbers y luego ponía el return, pero luego lo simplifiqué cuando me tiraba error, es porque map reemplaza al for cierto?? `def multiply_numbers(numbers):    # Escribe tu solución 👇    return  list(map(lambda number: number*2, numbers))` `numbers = [1, 2, 3, 4]response = multiply_numbers(numbers)print(response) `
```js def multiply_numbers(numbers): # Escribe tu solución 👇 numbers_2 = list(map(lambda i:i*2, numbers)) return numbers_2 numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
la función lambda acorta resume tremendamente las lineas de código.
![](https://static.platzi.com/media/user_upload/image-357a5573-f8b1-4252-993f-9732b8b0cd26.jpg)
![](https://static.platzi.com/media/user_upload/Captura%20de%20Pantalla%202024-06-26%20a%20la%28s%29%2012.27.02-7e3ca6e0-e08e-4d41-b806-141c0e1e2f1f.jpg)
Esta estructura a mi me ayuda mucho para resolver los ejercicios.![](https://misapuntesyacimientos.wordpress.com/wp-content/uploads/2020/07/null-13.jpeg?w=1200)
![](https://static.platzi.com/media/user_upload/image-004f1b80-666f-43d4-b4a5-e7a093367845.jpg)
`def double_numbers(input_items):` ` return list(map(lambda number: number * 2, input_items.copy()))`
![](<Screenshot 2024-06-15 at 9.59.56 PM>)![](<Screenshot 2024-06-15 at 9.59.56 PM>)
respositorio <https://github.com/angel20125/python-2-comprehension-functions-2024> ![](https://static.platzi.com/media/user_upload/clase-22-73aef9fc-fb47-4acc-96fa-b618a32a67d1.jpg)
![](https://static.platzi.com/media/user_upload/image-c6311336-d7b8-41ff-b8dc-9da54d249f76.jpg)
![](https://static.platzi.com/media/user_upload/image-a62f65ef-bbdc-4d2b-a580-2540d10ffff2.jpg)
Mi solución: ```python def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda x: x * 2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
**Mi solucion:** ```js def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda x:x *2,numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
Esta es mi solucion ```js def multiply_numbers(numbers): # Escribe tu solución 👇 result = list(map(lambda number : number * 2 , numbers)) return result numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    result = list(map(lambda number : number \* 2 , numbers))    return result numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
![](https://static.platzi.com/media/user_upload/image-19447851-b286-4697-a913-960b88efa77a.jpg)
yo no entiendo poque nunca me funciona mis soluciones en este tipo de retos :/ ![](https://static.platzi.com/media/user_upload/image-ac57d014-fd60-4145-b0c9-8a58bc48f4ac.jpg)
```python numbers = [1, 2, 3, 4] print(list(map(lambda number: number * 2, numbers))) ```numbers = \[1, 2, 3, 4]print(list(map(lambda number: number \* 2, numbers)))
Recuerden chicos, lo importante es aprender y entender la lógica con la que funciona las funciones, bah, en si la programación.
```python def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda x: x*2 , numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    return list(map(lambda x: x\*2 , numbers)) numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
![](https://static.platzi.com/media/user_upload/image-9cd82428-9a12-4f7e-9a97-1ad87f7796dd.jpg)
este![](https://static.platzi.com/media/user_upload/image-887243cb-3b86-4281-8a3b-dd1b23d4262e.jpg) en mi algoritmo pero no me lo acepta ![](https://static.platzi.com/media/user_upload/image-e8a441ef-8d00-4578-aecb-603b2d28c6ed.jpg)cumple con el objetivo

Lo tuve correcto. solo me equivoqué. Donde iba “number”, yo use “i”. Ja ja. Y problemas con la maldita identación.

Adjunto la solución al problema : ![](https://static.platzi.com/media/user_upload/image-1d3f5129-c59a-48b3-b3f3-80785c50f011.jpg)
def nultiply\_numbers(numbers): result = list(map(lambda number: number\*2, numbers)) return result numbers = \[1, 2, 3, 4]response = nultiply\_numbers(numbers)print(response)
adjunto ![](https://static.platzi.com/media/user_upload/image-904c9adf-c0e2-42d6-aa2a-8f6b202e869a.jpg):
```js def multiply_numbers(numbers): numbers_v1 = list(map(lambda number: number * 2, numbers)) return numbers_v1 numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    numbers\_v1 = list(map(lambda number: number \* 2, numbers))    return numbers\_v1 numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
```js def multiply_numbers(numbers): # Escribe tu solución 👇 numbers = list(map(lambda numbers: numbers*2, numbers)) return numbers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    numbers = list(map(lambda numbers: numbers\*2, numbers))    return numbers    numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
# Solución 1: en una línea con Lambda y MAP
"""
numbers = [1, 2, 3, 4]
result = list(map(lambda number: number * 2, numbers))
print(result)
"""

# Solución 2: con una variable DEF para el playground
def multiply_numbers(numbers):
  # Escribe tu solución 👇
  result = list(map(lambda number: number * 2, numbers))
  return (result)

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)
def multiply\_numbers(numbers):    # Escribe tu solución 👇    return list(map(lambda numero : numero \* 2, numbers)) numbers = \[1, 2, 3, 4] response = multiply\_numbers(numbers) print(response) Esta fué mi solución!!
```js def multiply_numbers(lista): # Escribe tu solución 👇 return list(map(lambda elemento : elemento * 2, lista)) numbers = [1, 2, 3, 4] response = (multiply_numbers(numbers)) print(response) ```
esta es la respuesta que dii al ejercicio: ```js def multiply_numbers(numbers): return [number * 2 for number in numbers] numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) response_2 = list(map(lambda i: i*2, numbers)) print(response_2) ```def multiply\_numbers(numbers): return \[number \* 2 for number in numbers] numbers = \[1, 2, 3, 4] response = multiply\_numbers(numbers) print(response) response\_2 = list(map(lambda i: i\*2, numbers)) print(response\_2)
Recuerden que al definir la variable de entrada en lambda no tiene que ser necesariamente la misma palabra relacionada a la lista usada, puede ser X o i o cualquier otro y **la consola entenderá que representa cada elemento a iterar de la lista**. Al igual que el mismo nombre de la lista. Como en el código que use: (**les puede ahorrar espacio e intuición en su codigo**) ```python def multiply_numbers(lista): response = list(map(lambda x: x*2, lista)) return response numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(lista):    response = list(map(lambda x: x\*2, lista))    return response numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
numbers_1 = [2, 4, 5, 6, 8]
numbers_2 = [1, 1, -2, -3]   

multiply_numbers_v2 = list(map(lambda numer: numer * 2 ,numbers_1))    
print(multiply_numbers_v2)
multiply_numbers_v3 = list(map(lambda numer: numer * 2 ,numbers_2))    
print(multiply_numbers_v3)

esta fue mi solucion, pero el compilador me dice que estoy mal

```python def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda i: i * 2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) numbers = [1, 1, -2, -3] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    return list(map(lambda i: i \* 2, numbers)) numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response) numbers = \[1, 1, -2, -3]response = multiply\_numbers(numbers)print(response)
Mi solución: ```js def multiply_numbers(numbers): # Escribe tu solución 👇 numbers = list(map(lambda i: i * 2, numbers)) return numbers numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
Facilito. ```js def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda i: i * 2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    return list(map(lambda i: i \* 2, numbers)) numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
<def multiply_numbers(numbers):
    # Escribe tu solución 👇
    return [num * 2 for num in numbers]

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)> 

Creo que el resultado es mas simple que el ejemplo.

numbers = [1, 2, 3, 4]
response = (list(map(lambda num : num * 2, numbers)))
print(response)
![](https://static.platzi.com/media/user_upload/image-ff9c0185-5da5-48a0-bbce-98ef1d6f03d8.jpg)
![](https://static.platzi.com/media/user_upload/image-96f5dceb-72de-4ac3-9b0e-4c5ddb75dae4.jpg)![](https://static.platzi.com/media/user_upload/image-4b0d4254-6692-4d41-a231-bb73c9d00c11.jpg)
```js def multiply_numbers(numbers): # Escribe tu solución 👇 new_list = list(map(lambda x: x * 2, numbers)) return new_list numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
Reto multiplica todos los elementos por dos ![](https://static.platzi.com/media/user_upload/image-32175a99-38c0-4864-bc30-1c6871a9e0de.jpg)
```js def multiply_numbers(numbers): # Escribe tu solución 👇 multiply = list(map(lambda x: x*2, numbers)) return multiply numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    multiply = list(map(lambda x: x\*2, numbers))    return multiply numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
creo que lo super mega ultra resumido es asi, aunque claro pierdo la función ```js numbers = [1,2,3,4,5] print( [number*2 for number in numbers] ) ```
```python def multiply_numbers(numbers): return [number*2 for number in numbers] numbers = [1,2,3,4,5] response = multiply_numbers(numbers) print(response) ```
Solucion alternativa con un bucle for. def multiply\_numbers(numbers): # Escribe tu solución 👇 new\_list = \[] for i in numbers: new\_list.append(i\*2) return new\_list numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)
realmente es necesario definir la función multiply numbers? siendo que la función lambda busca simplificar esto

💻💡 Comparto mi solución:

def multiply_numbers(numbers):
  return list(map(lambda i: i * 2, numbers))

numbers = [2, 4, 5, 6, 8]
response = multiply_numbers(numbers)
print(response)
```python def multiply_numbers(numbers): return list(map(lambda x : x*2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
```js def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda x: x * 2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
He agregado una linea para que la lista sea inmutable en la referencia de memoria: `new_list = numbers.copy()    ` `new_list = list(map(lambda n : n * 2, numbers))    ` `return new_list`
Mi solución```js numbers = [1, 2, 3, 4] multiply_numbers = list(map(lambda number: number*2, numbers)) print(multiply_numbers) ```
Les dejo dos formas: usando map o usando listas por comprensiôn ![](https://static.platzi.com/media/user_upload/image-06b45060-3f25-414e-a01b-e9c5ab1bd457.jpg)![](https://static.platzi.com/media/user_upload/image-d80eea55-a3f6-42e1-aa53-2749f1568cfc.jpg)
```python def multiply_numbers(numbers): return list(map(lambda numbers: numbers * 2, numbers )) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
![]()![](https://static.platzi.com/media/user_upload/image-fef26b1d-f6ac-4cd7-a67b-9355ecba7565.jpg)
![](https://static.platzi.com/media/user_upload/image-da882ef7-a990-43fa-b5e0-78f9480f16a9.jpg)
````js def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda num:num *2, numbers)) numbers = [2, 4, 5, 6, 8] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers):    # Escribe tu solución 👇    return list(map(lambda num:num \*2, numbers)) numbers = \[2, 4, 5, 6, 8]response = multiply\_numbers(numbers)print(response) ```` esta fue mi solución
def multiply\_numbers(numbers): return list(map(lambda number: number \*2 ,numbers)) numbers = \[1, 2, 3, 4] response = multiply\_numbers(numbers) print(response)

Mi solución:

def multiply_numbers(numbers):
    numbers = list(map(lambda i: i * 2, numbers))
    return numbers

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)
```python def multiply_numbers(numbers): new_list = list(map(lambda x:x *2, numbers)) return new_list numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```
Mas retos en los cursos
```js def multiply_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda number:number * 2, numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```def multiply\_numbers(numbers): # Escribe tu solución 👇 return list(map(lambda number:number \* 2, numbers)) numbers = \[1, 2, 3, 4]response = multiply\_numbers(numbers)print(response)

Simple is better than complex.

def multiply_numbers(numbers):
    # Escribe tu solución 👇
    
    #return list(map(lambda number: number * 2, numbers)) # unnecessary map usage
    return [i * 2 for i in numbers]
    

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)
Encontré una solución con menos líneas de código pero el sistema no lo toma como una respuesta correcta: ![](https://static.platzi.com/media/user_upload/image-fbe460f2-6e75-43ca-94cc-384bd513381a.jpg)![]()

def multiply_numbers(lista:list) -> None:
return list(map(lambda number: number*2,lista))

def main():
lista_numeros = [1,2,3,4]
resultado = multiply_numbers(lista_numeros)
print(resultado)

if name==“main”:
main()

```js def multiply_numbers(numbers): return list(map(lambda number: number*2,numbers)) numbers = [1, 2, 3, 4] response = multiply_numbers(numbers) print(response) ```Mi solución

Solucion al reto.

def multiply_numbers(numbers):
    # Escribe tu solución 👇
    multiply_numbers = list(map(lambda x: x*2, numbers))
    return multiply_numbers

numbers = [1, 2, 3, 4]
response = multiply_numbers(numbers)
print(response)
undefined