Skip to content

Instantly share code, notes, and snippets.

@ChaitanyaBaweja
Last active July 30, 2019 05:06
Show Gist options
  • Save ChaitanyaBaweja/30c08e7a795749ca78a1b156d2c8d44e to your computer and use it in GitHub Desktop.
Save ChaitanyaBaweja/30c08e7a795749ca78a1b156d2c8d44e to your computer and use it in GitHub Desktop.
old_list = [1, 2, 3, 4]
cube_list = [i**3 for i in old_list]
print(cube_list) # Output: [1, 8, 27, 64]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment