- Disclaimer: The content of this repository is only for testing and training and is provided at the discretion of the author; So it may not be suitable for production or other conditions.
- Install and Run Python.
- Examples
- Homeworks
-
String
- Strings
encode, decode
strip, lstrip, rstrip
join, concatenation
endswith, startswith, find, rfind, index, rindex
translate, maketrans, format, format_map
partition, rpartition, splitlines, split, slice
(title, capitalize), (lower, upper, swapcase, casefold), (center, ljust, rjust)
in, (istitle, islower, isupper), isspace, isprintable, isidentifier, (isascii, isalpha), (isalnum, isnumeric, isdecimal, isdigit)
zfill, count, replace, len, expandtabs, multi-line, loop-over-characters, reverse
- Scape Chars
\t \f \" \n \r \b \oct \hex
-
random(), randint(), shuffle(), choice()
-
Operators
- Arithmetic
+ -
,... - Assignment
= += -=
,... - Comparison
== != >=
,... - Logical
and, or, not
- Identity
is, is not
- Membership
in, not in
- Bitwise
& | ^ ~ << >>
- Arithmetic
-
Debugging (break point)
-
List
- Ordered, Changeable, Indexed, Allow Duplicate
access, assign, iterate, list(), .append(), .insert(), .remove(), del, .pop(), .copy(), .extend(), .clear(), len(), .count(), slice, join, unpack, in, .index(), .reverse(), .sort()
-
Tuple
- Ordered, Unchangeable, Indexed, Allow Duplicate
- Tuples are unchangeable, or immutable so you cannot add or remove items from it
access, tuple with one item, tuple(), iterate, del completely, len(), .count(), slice, join, unpack, in, .index()
-
Set
- Unordered, Unchangeable (By index, But you can add/remove), Unindexed, No Duplicate
access, len(), set(), in, .add(), .update(), (.remove(), .discard(), .pop(), del), .copy(), .clear(), (.union(), intersection, difference, symmetric_difference), (disjoint, subset, superset)
frozenset()
-
Dictionary
- Ordered, Changeable, Key Value, No Duplicate
access, assign, .update(), dict(), .keys(), .values(), .items(), zip(), len(), .pop(), .popitem(), del, .clear(), .copy(), .fromkeys(), .setdefault())
-
DataTypes
- Numbers:
Integer, Float, Complex
- Sequence:
String
,Range
,List
,Tuple
,Bytes
,ByteArray
- Set:
Set
,FrozenSet
- Map:
Dictionary
- Nothing:
None
- Boolean:
Boolean
- Binary:
Bytes, ByteArray, MemoryView
bytes
is immutable; howeverbytearray
is mutable
- Numbers:
-
Module
-
Conversion, TypeCasting
-
Input
-
Keywords
- if, elif, else
- for
- while, continue, break
- try, except, finally
- and, or, not, in, is
- import, from, as
- class, def, lambda, pass, return, del
- global, nonlocal
- assert [Optonal], raise [Optonal]
- with [Optonal]
- yield [Optonal]
-
Scope, Globals, Locals
-
Math
-
- Class, Object
- Constructor
- ToString, Representation
- Methods
- Object Method
- Static Method
- Class Method
- Inheritance
- Override
- Overload
- Function Overloading
- Python does not support function overloading
- Operator Overloading [OPTIONAL]
- Function Overloading
- Getter, Setter ???
- Enum
- VENV
- Exception
- Custom Exception
- Types of Errors
- Meta
- Meta Classes
- Meta Programming
- Iterator
- Closure
- Descriptor
- Reflection
- Context Manager
- Regular Expression
- Socket
client
,server
- Data
- SQL, NoSQL, ORM (SQLAlchemy)
- JSON, CSV, XML, OWL, ...
- Serialization, Deserialization
- Dependency Injection
- Inversion of Control
- Message Passing
- Multi Threading
- Multi Processing
- Semaphore, Lock, Mutex