One thing necessary for learning when it comes to hacking and security researching is Python. You need to master Python as it is the core language that helps in the creation of tools and exploits. All the expert hackers and security pros suggest learning python in order to master the respective field. As it offers a wide range of flexibility, there’s no other language you can learn quickly, which proves to be really effective. Now, it is even easier than ever before to learn Python. Thanks to Yusheng, a Chinese developer, for putting in the entire Python 3 in one picture. With this brilliant infographic, learning Python takes no time. It is as easy as it could be. You might never find such a convenient and efficient way to learn Python again. Python 3 reference mind map covering native data types, operators, flow control and further language topics. A full text version follows this image.
Text version of the archived Python mind map

This text alternative follows the branches of the archived diagram. It preserves the image’s examples and identifies its set-output annotations as historical labels rather than verified current output. The image is a reference sketch, with several unexpanded branches.

Overview

The diagram is titled “python3 in one pic”. Its main branches are import this, Syntax Roles, Native Datatypes, Operators & Casting, Flow Control, Function, Class (OOP), Module, Pythonic, and Standard Libraries. Only the native-data-type and flow-control branches have expanded examples. A small ≡ symbol appears under Syntax Roles.

Numbers: integers
a = 1
b = 0x10                # 16
print(type(a))          # <class 'int'>
Numbers: floating point
c = 1.2
d = .5                  # 0.5
g = .314e1              # 3.14
print(type(g))          # <class 'float'>
Numbers: complex
e = 1+2j
f = complex(1, 2)
print(type(e))          # <class 'complex'>
print(f == e)           # True
Number operators
+  -  *  /  %  **
Strings
s1 = '🐶\n'
s2 = "Dogge's home"
s3 = """
Hello,
Dogge!
"""
print(type(s1))         # <class 'str'>
print("%s, %s, %s" % (s1, s2, s3))
# 🐶
# , Dogge's home,
# Hello,
# Dogge!
print(len(s1))          # 2
s = '学而时习之'
print('{0}:{1}'.format(s[0], s[-2]))  # 学:习
Bytes
# The image labels this branch “list of ascii character” and “0–255/x00–xff”.
byt = b'abc'
print(type(byt))        # <class 'bytes'>
print(byt[0] == 'a')    # False
print(byt[0] == 97)     # True
print(len(byt))         # 3
Boolean and None
True
False
print(type(True))       # <class 'bool'>
print(None is None)     # True
print(type(None))       # <class 'NoneType'>
Lists: creation, length and slicing
l = ['python', 3, 'in', 'one']
print(type(l))          # <class 'list'>
print(len(l))           # 4
print(l[0])             # 'python'
print(l[-1])            # 'one'
print(l[1:-1])          # [3, 'in']
Lists: alteration and index
l.append('pic')         # None
# l == ['python', 3, 'in', 'one', 'pic']
l.insert(2, '.4.1')     # None
# l == ['python', 3, '.4.1', 'in', 'one', 'pic']
l.extend(['!', '!'])    # None
# l == ['python', 3, '.4.1', 'in', 'one', 'pic', '!', '!']
print(l.pop())          # '!'
# l == ['python', 3, '.4.1', 'in', 'one', 'pic', '!']
print(l.pop(2))         # '.4.1'
# l == ['python', 3, 'in', 'one', 'pic', '!']
l.remove("in")
# l == ['python', 3, 'one', 'pic', '!']
del l[2]
# l == ['python', 3, 'pic', '!']
print(l.index('pic'))    # 2
Tuples
# The diagram labels a tuple “Immutable list”.
tp = (1, 2, 3, [4, 5])
print(type(tp))         # <class 'tuple'>
print(len(tp))          # 4
print(tp[2])            # 3
tp[3][1] = 6
print(tp)               # (1, 2, 3, [4, 6])
# Single element:
tp = (1,)               # Not tp = (1)
# Assign multiple values:
v = (3, 2, 'a')
(c, b, a) = v
print(a, b, c)          # a 2 3
Sets
st = {'s', 'e', 'T'}
print(type(st))
# The archived image prints <class 'list'> beside this line.
print(len(st))          # 3
# Empty:
st = set()
print(len(st))          # 0
st = {}
print(type(st))         # <class 'dict'>
# Alter:
st = set(['s', 'e', 'T'])
st.add('t')
st.add('t')
st.update(['!', '!'])
st.discard('t')
st.remove('T')
st.pop()
st.clear()
Set state annotations in the image
After the first and repeated st.add('t'), the displayed states both contain 's', 'e', 't', and 'T'.
The st.update annotation displays 's', 'e', 't', 'T', '!', and '!' (including the repeated exclamation mark shown in the image).
After st.discard('t'), the displayed members are 's', 'e', 'T', and '!'.
After st.remove('T'), the displayed members are 's', 'e', and '!'.
The image shows st.pop() returning 's', leaving 'e' and '!'.
After st.clear(), it displays set().
These are transcribed historical image annotations, not independently generated output.
Dictionaries
dic = {}
print(type(dic))        # <class 'dict'>
dic = {'k1': 'v1', 'k2': 'v2'}
print(len(dic))         # 2
print(dic['k2'])        # 'v2'
print(dic.get('k1'))     # 'v1'
print(dic.get('k3', 'v0'))  # 'v0'
dic['k2'] = 'v3'
print(dic)              # {'k1': 'v1', 'k2': 'v3'}
print('k2' in dic)      # True
print('v1' in dic)      # False
Flow control: if
import sys
if sys.version_info.major < 3:
    print("Version 2.X")
elif sys.version_info.major > 3:
    print("Future")
else:
    print("Version 3.X")
Flow control: for and while loops
for i in 'Hello':
    print(i)

prod = 1
i = 1
while i < 10:
    prod = prod * i
    i += 1
print(prod)

The Great Guide

While the above picture completely explains each dimension of Python, this guide with further help you understand what Python actually is and how it works.

Why is Python?

Python has taken the programming community to the next level with its rich features and vivid functionality. This makes it an important next-generation skill to develop. As it is a free source and many-in-one programming language, it is easier to learn and serves different purposes. Since its release in 1991, it has gone through various improvements and so, has evolved. Now, Python is more refined and functional than it was a decade ago.

What makes Learning Python 3 Important?

Python 3 comes with a number of advantages as compared to other programming languages. This is mainly due to its reusability and flexibility attached to the programs. Be it machine learning, deep learning, artificial intelligence or any other modern domain, Python 3 is easy to implement. This is because its numerous modules allow to implement programs in an easier way. Moreover, Python 3 is reliable and has great community support. It is not only portable but highly efficient as it offers clear structural specifications when writing any code. With no traditional and old-style programming syntax, Python 3 is the favorite language of hackers and security researchers. As reading Python code is easier and efficient, it gives Python an upper hand among its competitors like Java R and Go Lang. When it comes to developer forum, Python 3 has gained a lot of popularity in a short period of time. Python 3 serves a lot of uses due to its exceptional features and advantages. It helps implement various technologies such as Machine Learning, Web Design and Data Analytics etc. Also, it offers application development, array handling, and complex matrix functions and data visualization.

Some Popular Applications of Python 3

To your surprise, all the applications that are widely popular and in-demand nowadays use Python 3. Following are the bunch of applications that are developed with Python 3 code:
  • Facebook
  • Instagram
  • Twitter
  • WhatsApp
It would not be wrong to say that the world is currently running on codes of Python 3.

Fundamentals of Python 3

After going through the important features and uses of Python 3, you must be thinking where to start learning it. The following are some fundamentals of Python 3, also described and used in the picture above:
  • Variables and operators
In order to store any information in the memory, variables are used. These are later used to perform different calculations.
  • Conditionals and loops
Conditionals and loop are implemented to control any flow of program. Some good examples are while loop, for loop and switch statements etc.
  • I/O operations
With I/O operations, you can fetch information from a particular source and further send it to another target.
  • Modules
Looking into modules helps understand what different operations and functions can be performed through supported modules.

Where to Learn?

When it comes to various learning platforms for Python 3, Pluralsight and CBT Nuggets are two prominent ones. Both offer a number of videos to learn Python 3 with great ease and efficiency. However, when it comes to the showdown between Pluralsight and CBT Nuggets, Pluralsight is the prominent winner. It comes with a wider range of videos and more professional methodology, especially for beginners. If you’re weighing up the cost, check what a plan with the courses you want costs today.

We make some money when you purchase a product from a link on our website. If you found the content helpful, please use the link to get to the chosen provider of your choice. It doesn’t cost you a thing and it helps us put out great content. The money involved does not effect the ratings of any given product or service, we just link to an affiliate if there is one available after we write the article.

Disclaimer