Skip to content

Instantly share code, notes, and snippets.

@royletron
Created March 16, 2013 12:48
Show Gist options
  • Save royletron/5176236 to your computer and use it in GitHub Desktop.
Save royletron/5176236 to your computer and use it in GitHub Desktop.
a = ["red", "blue", "red", "red", "yellow"]
b = 0
for i in a:
if i == "red":
b += 1
print(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment