Skip to content

Instantly share code, notes, and snippets.

@soyHouston256
Created October 29, 2020 14:11
Show Gist options
  • Save soyHouston256/280dfead72f1b3c80b31ed9773f0c587 to your computer and use it in GitHub Desktop.
Save soyHouston256/280dfead72f1b3c80b31ed9773f0c587 to your computer and use it in GitHub Desktop.
import random
def run():
mi_diccionario = {
'llave1':1,
'llave2':2,
'llave3':3,
'llave4':4,
}
print(mi_diccionario["llave1"])
for llave in mi_diccionario.keys():
print(llave)
for llave in mi_diccionario.values():
print(llave)
for llave in mi_diccionario.items():
print(llave)
for llave,valor in mi_diccionario.items():
print(llave+" - "+str(valor))
if __name__ == "__main__":
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment