It shows the data structure concept of a dictionary in python (Photo credit: Wikipedia) |
Basics of Python -A look
Learning python is not a tough work if you know what are programming languages,had deal with some of them. When I started working with python language,today professionally, I found it to be easy to begin with python docs itself. The docs are fully functional and easy to get in . The main thing in python to learn is Data structures
the main data structures are -dictionary ,Sets,tuple,List,stacks,Queue. The Dictionary is what you are watching in the image here. It is based on Key:Value relationship.
Also the fastest data structures in language are dictionaries itself ,retrieve data from a list of millions of data ,in seconds with the help of key. To create a dictionary in python ,the following syntax is used :-
d=('ABC':111 )
where ABC refers to Key and 111 refers t its values
One important thing we can have here in dictionary is Link comprehensions.It is somewhat like the following code
d=(x,x**2) for x in (2,4,6)
this code is easy to read an manipulate as well .hence the programming deals with such code also .
No comments:
Post a Comment