Generation

generate functionTue, 16 May 2023

Generarar por comprención la siguiente lista [1, 2, 4, 8, 16, 32, 64, 128, 256].

def lista_potencias_2 (n): return [2**i for i in range(n)] lista_potencias_2(9)

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