Skip to content

Instantly share code, notes, and snippets.

@erickdsama
Created July 13, 2019 00:22
Show Gist options
  • Save erickdsama/452af96cc841a5cd2988acec2d017e6e to your computer and use it in GitHub Desktop.
Save erickdsama/452af96cc841a5cd2988acec2d017e6e to your computer and use it in GitHub Desktop.
Como utilizar todas los tipos de variables en python
mensaje = "hola mundo"
iteraciones = 10
mensajes = []
pares = True
for iteracion in range(iteraciones):
par = iteracion % 2 == 0
if (pares and par) or (not pares and not par):
info = {"mensaje": mensaje, "iteracion": iteracion}
mensajes.append(info)
# python 3
#print(mensajes)
# ptyhon 2
print mensajes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment