Category

Programming Tutorials and Coding Guides

Explore programming tutorials with practical examples across multiple languages, scripting, and development concepts for beginners and advanced users.

Welcome to the Programming tutorials section, where you will learn coding concepts with real-world examples across multiple languages and platforms.

This category includes beginner to advanced guides covering scripting, automation, and application development in Java, JavaScript, Python, Go, TypeScript, and related stacks.

Whether you are learning programming for system administration or building applications, browse the articles below for practical examples and language-specific references.

Programming plays a crucial role in modern infrastructure and DevOps workflows. You can also explore DevOps and Linux to see how code integrates with system-level operations.

956 articles

Programming category illustration with code editor, automation, and debugging graphics
programming

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.

Azka Iftikhar6 min read
programming

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.

Deepak Prasad8 min read
programming

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.

Deepak Prasad5 min read
programming

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.

Deepak Prasad7 min read
programming

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.

Bashir Alam6 min read
programming

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.

Bashir Alam7 min read
programming

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.

Deepak Prasad6 min read
programming

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.

Bashir Alam6 min read
programming

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.

Bashir Alam7 min read
programming

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.

Deepak Prasad10 min read
programming

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.

Bashir Alam5 min read
programming

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.

Bashir Alam6 min read
programming

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.

Deepak Prasad6 min read
programming

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.

Deepak Prasad7 min read
programming

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.

Deepak Prasad7 min read
programming

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.

Bashir Alam7 min read
programming

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.

Deepak Prasad8 min read
programming

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.

Bashir Alam6 min read
programming

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.

Deepak Prasad6 min read
programming

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.

Deepak Prasad8 min read
programming

Python datetime Module

Learn Python datetime module with examples for date, time, datetime, now(), strftime(), strptime(), ctime(), timestamps, timedelta, and time zones using zoneinfo.

Deepak Prasad9 min read
programming

Python dataclass

Learn Python dataclass with simple examples, including @dataclass, default values, field(default_factory), frozen dataclasses, ordering, __post_init__, asdict(), and common mistakes.

Deepak Prasad10 min read
programming

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.

Bashir Alam9 min read
programming

Python casefold() String Method

Learn Python string casefold() with syntax, examples, Unicode case-insensitive comparison, casefold vs lower, and common mistakes when comparing strings.

Deepak Prasad4 min read
programming

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.

Deepak Prasad11 min read
programming

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.

Bashir Alam8 min read
programming

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.

Deepak Prasad7 min read
programming

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.

Deepak Prasad6 min read
programming

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 …

Deepak Prasad2 min read
programming

Python argparse Example

Learn Python argparse with practical examples for positional arguments, optional flags, default values, type conversion, choices, nargs, boolean flags, and subcommands.

Deepak Prasad8 min read