Skip to content

Clean representation of how every datatype in python should be used.

Notifications You must be signed in to change notification settings

BhargavKadali39/Python_Data_Structure_Cheat_Sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Python_Data_Structures_Cheat_Sheet

Data type Mutable Ordered Indexing Duplicate
List [ ] yes yes yes yes
Tuple ( ) no yes yes yes
Set { } no no no no
Dictionary { key : value } yes yes no no

Now what is the whole point of creating the cheatsheet in the first place you ask!

Using a little logical thinking here, anyone can crack many basic programs like removing duplicates from a list.
So how is it done you say!
let me explain

using set() method, that's it,
As we can observe from above,List allow Duplications but Set don't.
Go to the python file linked in this repo for detailed code.

You can use this to make projects like password generator but with no duplicate characters in it and much more.

  • From below you can copy if you want to 😉🥇.

    Data type        Mutable    Ordered   Indexing   Duplicate
    
    List [ ]          yes        yes       yes         yes
    
    Tuple ( )         no         yes       yes         yes
    
    Set { }           no         no        no          no
    
    Dictionary        yes        yes       no          no
    { key : value }
    

Releases

No releases published

Packages

No packages published

Languages