× πŸ€™Contact meπŸ€™
Instagram Linkdeln



πŸ§‘β€πŸ’» Python πŸ§‘β€πŸ’»


The python language is one of the most accessible programming languages available because it has simplified syntax and not complicated, which gives more emphasis on natural language. Due to its ease of learning and usage, python codes can be easily written and executed much faster than other programming languages.

Some operations of python

Operations Result
+ add the variables
- subtract the variables
* multiply the variables
/ divide the variables
# comment the line
== compare the variables
< > compare the variables


LIST VS TUPLE VS DICTIONARY VS SET

| LIST |
Lists are one of the most commonly used data structures provided by python. They are a collection of iterable, mutable and ordered data. It can contain duplicate data.


| TUPLE |
Tuples are similar to lists. This collection also has iterable, ordered, (can contain) repetitive data just like lists. But unlike lists, tuples are immutable.


| DICTIONARY |
Unlike all other collection types, dictionaries strictly contain key-value pairs.


| SET |
Sets are used to store multiple items in a single variable. Set items are unchangeable, but you can remove items and add new items.




Column A Column B
List List can be represented by [ ]
Tuple Tuple can be represented by ()
Dictionary Dictionary can be represented by {}
Set Set can be represented by {}



DATA TYPES IN PYTHON

  
Column A Column B
Text Type str
Numeric Types int, float, complex
Sequence Types list, tuple, rangeM
apping Type dict
Set Types set, frozenset
Boolean Type bool
Binary Types bytes, bytearray,memoryview
None Type NoneType


NUMBERS IN PYTHON πŸ§‘β€πŸ’»

There are three numeric types in Python

int

Int = Int, or integer, is a whole number, positive or negative, without decimals, of unlimited length

Float

Float, or "floating point number" is a number, positive or negative, containing one or more decimals.

Complex

Complex numbers are written with a "j" as the imaginary part