Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- distros = ["Gentoo","Ubuntu","Fedora","Pardus","Debian","Slackware"]
- darwin = "iOS"
- mi_dic = {}
- ## Aqui lo llenamos:
- mi_dic['Linux'] = distros
- mi_dic['Darwin'] = darwin
- # Ya tiene llaves
- for i in mi_dic["Linux"]:
- print ("Una distro famosa de Linux es :", i)
- # Llamos iOS
- print ("\nDarwin se encuentra en :", mi_dic['Darwin'])
- # Cambiamos el valor
- mi_dic['Darwin'] = "MacOS X"
- print ("Darwin se encuentra en :", mi_dic['Darwin'], "\n")
- for i in mi_dic:
- print ("Llave: ",i)
- print ("\nElimino Linux\n")
- del mi_dic["Linux"]
- for i in mi_dic:
- print ("Llave: ",i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement