Skip to content

Instantly share code, notes, and snippets.

@roman-on
Created April 21, 2020 00:17
Show Gist options
  • Save roman-on/9230ff2929550e8bd8331aab594371db to your computer and use it in GitHub Desktop.
Save roman-on/9230ff2929550e8bd8331aab594371db to your computer and use it in GitHub Desktop.
"""
The function accepts two parameters: list and number n.
The function returns a new list containing all organs larger than the number n.
>>> result = is_greater([1, 30, 25, 60, 27, 28], 28)
>>> print(result)
[30, 60]
"""
def is_greater(my_list, n):
result = []
for num in my_list:
if num > n:
result.append(num)
return (result)
def main():
<your code here>
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment