Skip to content

Instantly share code, notes, and snippets.

@sankars
Created May 20, 2014 09:29
Show Gist options
  • Save sankars/2ddf5b710a67358f0e52 to your computer and use it in GitHub Desktop.
Save sankars/2ddf5b710a67358f0e52 to your computer and use it in GitHub Desktop.
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