Skip to content

Instantly share code, notes, and snippets.

@imShakil
Created August 10, 2020 10:48
Show Gist options
  • Save imShakil/e53d4b1e320bf00e01b318d6ed9b5d5f to your computer and use it in GitHub Desktop.
Save imShakil/e53d4b1e320bf00e01b318d6ed9b5d5f to your computer and use it in GitHub Desktop.
def square_number(list_of_number):
return [num ** 2 for num in list_of_number]
def test_square_number():
assert square_number([1, 2, 3, 4, 5]) == [1, 4, 9, 16, 25]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment