Created
January 18, 2014 22:14
-
-
Save oscargicast/8497509 to your computer and use it in GitHub Desktop.
sample3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = "Python" | |
#Imprime caracteres individuales en a | |
for c in a: | |
print c | |
b =['Python', 'Node.js', 'C++', 'R'] | |
#Imprime los miembros de una lista | |
for name in b: | |
print name | |
c = {'Google':490.10,'IBM' :91.50,'AAPL': 123.15 } | |
#Imprime todos los miembros de un diccionario | |
for key in c: | |
print key, c[key] | |
#Imprime todas las lineas en un archivo | |
f = open('res.txt') | |
for line in f: | |
print line, | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment