Python Scope
Learn Python variable scope: local vs global variables, the LEGB rule, the global and nonlocal keywords, closures, and the UnboundLocalError trap.
Online Learning Platform
Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.
Learn Python variable scope: local vs global variables, the LEGB rule, the global and nonlocal keywords, closures, and the UnboundLocalError trap.
Learn Python lambda functions: syntax, when to use them, and how they work with sorted(), map(), filter(), max() and min(), with runnable examples.
Learn Python list comprehensions: transform and filter lists in one line, use if-else inside, nested comprehensions, plus set and dict comprehensions.
BeginnerLesson 17 of 4710 min read8 runnable examplesFormatting turns values into neat, readable text: prices with two decimals, columns that line up, percentages, dates. f-strings are…
Learn Python's match case statement, the switch-case alternative: literal patterns, OR patterns, guards, wildcards and matching lists, tuples and dicts.
Learn every Python operator: arithmetic, assignment, comparison, logical, identity, membership and bitwise, plus booleans, truthiness and operator precedence.
Learn Python type conversion with int(), float(), str(), bool(), list(), tuple(), set() and dict(), implicit vs explicit casting, and how to avoid ValueError.
Learn Python numbers: int, float and complex, arithmetic, rounding, float precision, the math module and random numbers, with runnable examples.
Learn the Python input() function: read text, convert it to int or float, read several values on one line, and handle invalid input safely.
Learn Python print() with sep, end and f-strings, print to a file, and write single-line comments, multi-line comments and docstrings, with runnable examples.
Learn Python syntax rules: statements, indentation, blocks, line continuation, keywords and case sensitivity, with runnable examples and common errors.
Handle flaky Playwright Python tests: causes and fixes, retries with pytest-rerunfailures, the flaky marker, only-rerun, --fail-on-flaky and pytest-repeat.
Take free timed mock tests with answers and explanations.