Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save HandsonMatheus/91a00029de03a1bc7a3d1e0d04180fe2 to your computer and use it in GitHub Desktop.

Select an option

Save HandsonMatheus/91a00029de03a1bc7a3d1e0d04180fe2 to your computer and use it in GitHub Desktop.
# THIRD EXERCISE ON PRACTICEPYTHON.ORG
# Creating the list
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
# Checking if the number is less then 5
def print_less_than_5(list):
for number in list:
if number < 5:
print(number)
# Printing the result
print(print_less_than_5(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment