Skip to content

Instantly share code, notes, and snippets.

View the-rahulpatel's full-sized avatar

Rahul Patel the-rahulpatel

View GitHub Profile
@the-rahulpatel
the-rahulpatel / Answers.py
Created April 17, 2021 06:11
Answers of doughsay/lc-practice.py
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]