Skip to content

Instantly share code, notes, and snippets.

@pralabhsaxena05
Last active April 9, 2021 21:14
Show Gist options
  • Save pralabhsaxena05/dd333825167cd49f24cafed160a1ad4a to your computer and use it in GitHub Desktop.
Save pralabhsaxena05/dd333825167cd49f24cafed160a1ad4a to your computer and use it in GitHub Desktop.
#List containing even numbers
even_List = [num for num in range(10) if num%2 == 0]
#Square of given numbers
square_List = [num*num for num in range(10)]
print("Even numbers are: ", even_List)
print("Squared numbers are: ", square_List)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment