Created
May 20, 2014 09:29
-
-
Save sankars/2ddf5b710a67358f0e52 to your computer and use it in GitHub Desktop.
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
def main(): | |
print('hello from python') | |
## 2 ways to iterate a list | |
movies = ['spi', 23, "pos"] | |
## way 1 | |
for item in movies: | |
print(item) | |
## way 2 | |
count = 0 | |
while( count < len(movies) ): | |
print(movies[count]) | |
count += 1 | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment