Skip to content

Instantly share code, notes, and snippets.

@Robofied
Created February 5, 2019 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robofied/1a3ec8b0849638d50672c6790f2231a5 to your computer and use it in GitHub Desktop.
Save Robofied/1a3ec8b0849638d50672c6790f2231a5 to your computer and use it in GitHub Desktop.
## Lists are heterogenous in nature.
l3 = ['a' ,1, 'hello']
print(l3)
#[Output]:
#['a', 1, 'hello']
## Lists are mutable in nature.
l2 = l1
l1[0] = 0
print(l1)
print(l2)
#[Output]:
#[0, 2, 3, 4]
#[0, 2, 3, 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment