Created
September 6, 2021 18:16
-
-
Save janash/20805fb0f04f8341a87c0ab1f7fedc68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = abs(5) | |
def abs(values): | |
"""Extend abs function to work on lists""" | |
import builtins | |
if type(values) == list: | |
for i in range(len(values)): | |
values[i] = builtins.abs(values[i]) | |
else: | |
values = builtins.abs(values) | |
return values | |
t = abs(5) | |
print(builtins.abs(5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment