Ever saw the Universe Size Comparison videos and wondered if someone would make one about python operators? No? Well, here is one anyway.
The "size" of each operator is based on their precedence.
Official list of precedence (python 3.12): https://docs.python.org/3/reference/e...
While there is no official way to sort operators with same precedence, I ordered them in non-increasing order from left to right. This is because each operator needed to be "bigger" than its previous one.
The video has been generated with the help of pygame-ce.
The source code can be found here: https://github.com/tank-king/Tutorial...
TimeStamps:
00:00 : disclaimer
00:02 : assignment
00:04 : walrus operator
00:06 : lambda function
00:10 : conditional expression
00:14 : logical OR
00:19 : logical AND
00:23 : logical NOT
00:28 : equality
00:31 : inequality
00:35 : greater than or equal to
00:38 : greater than
00:41 : less than or equal to
00:45 : less than
00:48 : identity not equal
00:54 : identity equal
00:57 : not in
01:01 : in
01:05 : bitwise OR
01:08 : bitwise XOR
01:12 : bitwise AND
01:15 : right shift
01:19 : left shift
01:23 : subtraction
01:26 : addition
01:30 : modulo
01:34 : floor division
01:37 : division
01:41 : matrix multiplication
01:45 : multiplication
01:48 : bitwise NOT
01:51 : negation
01:54 : unary plus
01:58 : exponentiation
02:01 : await
02:05 : attribute access
02:08 : function call
02:12 : slicing
02:17 : indexing
02:21 : set
02:25 : dictionary
02:29 : list
02:32 : grouping
02:36 : subscribe
Music Credits:
----------------------------------------------------------------------------------------------------------------------------------------------
"Makai Symphony - Dragon Castle" is under a Creative Commons license (CC BY-SA 3.0).
/ makai-symphony
Music promoted by BreakingCopyright: https://bit.ly/bc-dragon-castle-song
----------------------------------------------------------------------------------------------------------------------------------------------
Auf dieser Seite können Sie das Online-Video Python Operator Size (Precedence) Comparison mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code King 15 November 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 444 Mal angesehen und es wurde von 18 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!