Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Last active September 16, 2020 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/7339795b7981117315f55833bf6226a5 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/7339795b7981117315f55833bf6226a5 to your computer and use it in GitHub Desktop.
#Single underscore used in for loop
for _ in range(5):
print ("Python")
'''
Output:
Python
Python
Python
Python
Python
'''
#Iterating through list
colors=["red","blue","green"]
for _ in colors:
print (_)
'''
Output:
red
blue
green
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment