Generation

generate functionThu, 25 May 2023

Dado el arreglo [1, 2, 3, 4, 5] y n=2 obtiene [1,2,3]

def take(a, n): return a[:n] take([1, 2, 3, 4, 5], 2)

Want to kickstart your project?Use the new AI Studio to create your code