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
def identity(nums): | |
return [i for i in nums] | |
# without list comprehension | |
# return [*nums] | |
def doubled(nums): | |
return [i*2 for i in nums] | |
def squred(nums): | |
return [i**2 for i in nums] |