Last active
September 5, 2019 06:25
-
-
Save MishraKhushbu/bdd2edc6ca8a32a18c8ed393af04665b to your computer and use it in GitHub Desktop.
Data Structures/29Jan2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://res.cloudinary.com/dyd911kmh/image/upload/c_scale,f_auto,q_auto:best,w_700/v1512740202/Template_2_oxrskq.png | |
Data structures(list,tuple,strings,dictionary,sets) | |
=========================================================== | |
Diff between tuple and sets | |
tuple:Immutable type,can contain dubplicates also defined in() whereas indexed | |
Sets:Mutable type,cannot contain dubplicates and defined in {} | |
empty set has to define like | |
a = set() | |
operations can be performned like union(|),intersection(&),difference(-) and symmetric difference(^) | |
========================================================================== | |
https://www.datacamp.com/community/tutorials/data-structures-python -->high level data structure | |
Difference between remove , del and pop() | |
Remove item at index: mylist.remove(index) | |
Delete item at index: del mylist[index] | |
Remove and get last item: x = mylist.pop() | |
https://www.8bitavenue.com/difference-between-del-remove-and-pop-in-python/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment