Python Password Input with Asterisks
Learn how to take password input in Python and show asterisks while typing using getpass echo_char, pwinput, and stdiomask, with examples and common mistakes.
Cobalt Python Library for Akoma Ntoso XML
Learn how to use the Cobalt Python library to work with Akoma Ntoso XML documents, metadata, FRBR URIs, Act documents, validation, and document parsing.
Python Concatenate Strings: +, f-strings, join, and +=
Learn how to concatenate strings in Python with +, f-strings, str.join, +=, spaces, mixing variables and numbers, performance in loops, mistakes, and a quick reference table.
Python Copy List: Assignment, copy.copy(), and deepcopy()
Learn how to copy or clone a Python list using assignment, shallow copy.copy(), list slicing, list.copy(), and copy.deepcopy(), with examples that show when nested objects are shared or independent.
Python ceil() Function
Learn Python ceil() using math.ceil() with examples for positive and negative numbers, ceiling division, ceil vs floor, integers, floats, and common mistakes.
Python Class Example
Learn Python classes with simple examples to create a class, create objects, use __init__ and self, define attributes and methods, class variables, inheritance, and common mistakes.
Global Variables in Python: global, local, nonlocal, and modules
Learn Python global vs local variables, when to use the global and nonlocal keywords, reading and writing globals from functions, mutables, modules, common mistakes, and a quick reference table.
Get Size of Priority Queue in Python: qsize, empty, and maxsize
Learn how to get the size of a Python PriorityQueue with qsize(), compare it to empty() and full(), understand approximate counts under threads, and relate current size to maxsize.
Python Delete File
Learn how to delete a file in Python using pathlib Path.unlink(), os.remove(), and os.unlink(), including delete-if-exists examples, error handling, and deleting all files in a folder.
Fix Unknown Time Zone Error in Google Calendar API
Fix Google Calendar API unknown time zone errors by using IANA time zone names, RFC3339 date-time strings with offsets, and Python zoneinfo—avoid ambiguous abbreviations like IST or PST.
Python property deleter
Learn how Python property deleter works with @property, @name.setter, and @name.deleter, including how del obj.attr calls the deleter method and common mistakes.
Python Exit Program
Learn how to exit a Python program or script using sys.exit(), exit(), quit(), return, and break, including exit codes, messages, functions, loops, and common mistakes.
Python enumerate() Function
Learn Python enumerate() with simple for loop examples. Use enumerate() to get index and value while looping through lists, strings, tuples, dictionaries, and files.
Python Dictionary Explained
Learn Python dictionary with simple examples, including dictionary syntax, creating dictionaries, accessing values, adding and updating items, looping, checking keys, removing items, and common dictionary methods.
Python Enum
Learn Python Enum with simple examples, including enum class syntax, name and value, iteration, auto(), IntEnum, StrEnum, enum methods, multiple attributes, and common mistakes.
Python Delete Variable
Learn how to delete a variable in Python using del, what happens after deleting a variable, how to clear variables, unset names, and whether del frees memory immediately.
Python Break Statement: for, while, Nested Loops, and else
Learn the Python break statement to exit for and while loops early, how break behaves in nested loops, how it interacts with loop else, break vs continue, and common mistakes.
How to Get File Size in Python: pathlib, os.path, and bytes
Learn how to get file size in Python with os.path.getsize, pathlib Path.stat, and os.stat, convert bytes to KB or MB, guard large or empty files, handle errors, and sum folder sizes.
Python Extend Dictionary
Learn how to extend a dictionary in Python using update(), the |= operator, the | merge operator, and dictionary unpacking. Also learn why dict has no extend() method like list.
Python Logging
Learn Python logging with simple examples. Configure logging using basicConfig(), log to console and file, use log levels, create loggers, handlers, formatters, and avoid common mistakes.
Python datetime Module
Learn Python datetime module with examples for date, time, datetime, now(), strftime(), strptime(), ctime(), timestamps, timedelta, and time zones using zoneinfo.
Python dataclass
Learn Python dataclass with simple examples, including @dataclass, default values, field(default_factory), frozen dataclasses, ordering, __post_init__, asdict(), and common mistakes.
Python Counter
Learn Python Counter from the collections module with examples to count items, words, characters, add elements, update counts, use most_common(), elements(), subtract(), and Counter arithmetic.
Python casefold() String Method
Learn Python string casefold() with syntax, examples, Unicode case-insensitive comparison, casefold vs lower, and common mistakes when comparing strings.
Python if else Statement: Syntax, elif, Flowchart, and Examples
Learn the Python if, if else, and if elif else statements: syntax, indentation, elif vs else-if, conditions, flow, nested branches, ternary expressions, loop/try else, and common mistakes.
Python classmethod: @classmethod, cls, and Factory Methods
Learn Python classmethod with examples using @classmethod, cls, class variables, factory methods, return cls, and the difference between class methods, instance methods, and static methods.
Python Check if File Exists
Learn how to check if a file exists in Python using pathlib Path.exists(), Path.is_file(), os.path.exists(), and os.path.isfile(), with examples for directories, symlinks, and file errors.
Python Return Multiple Values
Learn how to return multiple values from a Python function using comma-separated return values, tuple unpacking, lists, dictionaries, NamedTuple, dataclass, and common mistakes.
Python Tutorial for Beginners (Hands-On)
Free, complete Python tutorial for beginners - variables, strings, lists, dicts, control flow, OOP, file I/O, error handling, regex, concurrency, and Flask, with a full index of every linked hands-on lesson for Python …
Python argparse Example
Learn Python argparse with practical examples for positional arguments, optional flags, default values, type conversion, choices, nargs, boolean flags, and subcommands.

