Skip to content

Instantly share code, notes, and snippets.

@rekibnikufesin
Created February 27, 2018 03:38
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 rekibnikufesin/67ec3c5525d9fd7a94fbbaaa9ac4e217 to your computer and use it in GitHub Desktop.
Save rekibnikufesin/67ec3c5525d9fd7a94fbbaaa9ac4e217 to your computer and use it in GitHub Desktop.
x = [1, 2, 3]
print(x)
y = [1, 2, 3]
print(y)
x.append(4)
y.extend([4])
x.append([5, 6])
y.extend([5, 6])
print(x) # [1, 2, 3, 4, [5, 6]]
print(y) # [1, 2, 3, 4, 5, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment