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 strip()

Learn how Python strip() works with examples. Remove leading and trailing whitespace, strip specific characters, compare strip(), lstrip(), and rstrip(), and avoid common mistakes with prefixes and suffixes.

Bashir Alam6 min read
programming

Simple Linear Regression in Python

Learn simple linear regression in Python using pandas, scikit-learn, and matplotlib. Train a model, make predictions, evaluate accuracy, plot the regression line, and save predictions to a CSV file.

Bashir Alam6 min read
programming

NumPy Shuffle Array

Learn how to shuffle a NumPy array using np.random.shuffle(), Generator.shuffle(), and permutation(). Also see how to shuffle two arrays or lists together in the same random order.

Azka Iftikhar5 min read
programming

Seaborn Scatter Plot

Learn how to create a Seaborn scatter plot using sns.scatterplot(). See examples with hue, style, size, palette, marker size, transparency, labels, legends, and regression lines.

Deepak Prasad6 min read
programming

Remove Key from Dictionary in Python

Learn how to remove a key from a Python dictionary using pop(), del, dictionary comprehension, and safe methods to avoid KeyError when the key may not exist.

Deepak Prasad6 min read
programming

Python zip() Function

Learn how the Python zip() function works with lists, tuples, dictionaries, and loops. See how to handle different lengths with strict=True and zip_longest().

Bashir Alam8 min read
programming

Python zipfile Module

Learn the Python zipfile module with examples. Create and append ZIP archives, list and read members, extract files safely, handle passwords on read, choose compression, use BytesIO, and rebuild archives without a …

Deepak Prasad7 min read
programming

Sort Dictionary by Key in Python

Learn how to sort a dictionary by key in Python using sorted(), dict(), lambda, itemgetter(), reverse=True, case-insensitive sorting, and nested dictionary examples.

Deepak Prasad7 min read
programming

Python Substring

Learn how to get and check substrings in Python using slicing, the in operator, find(), index(), count(), and replace(). See extraction before or after a character and common mistakes.

Bashir Alam5 min read
programming

Python super()

Learn how Python super() works with inheritance. See how to use super().__init__() in child classes, call parent methods, understand MRO, and avoid common multiple inheritance mistakes.

Bashir Alam6 min read
programming

Python Symmetric Difference

Learn symmetric difference in Python using set.symmetric_difference() and the ^ operator. See examples, difference vs symmetric difference, multiple sets, lists, tuples, and common mistakes.

Bashir Alam6 min read
programming

Python switch case

Learn how to write switch case logic in Python using match case, if-elif statements, and dictionary mapping. See Python switch statement examples, default cases, multiple cases, and when to use each approach.

Bashir Alam7 min read
programming

Python Ternary Operator

Learn how the Python ternary operator works using value_if_true if condition else value_if_false. See simple examples, nested ternary expressions, list comprehension usage, and common mistakes.

Bashir Alam6 min read
programming

Python Tree Data Structure

Learn tree data structure in Python with simple examples. Understand nodes, root, children, binary trees, binary search trees, DFS, BFS, inorder, preorder, and postorder traversal.

Deepak Prasad13 min read
programming

Sort Dictionary by Value in Python

Learn how to sort a dictionary by value in Python using sorted(), lambda, itemgetter(), reverse=True, and custom sorting. See examples for ascending order, descending order, duplicate values, and nested dictionaries.

Deepak Prasad6 min read
programming

Python Sort List

Learn how to sort a list in Python using list.sort() and sorted(). See examples for ascending order, descending order, strings, numbers, custom key functions, list of lists, tuples, dictionaries, None values, and common …

Bashir Alam6 min read
programming

Python Split String

Learn how to split a string in Python using str.split(). See examples for splitting by whitespace, comma, newline, multiple spaces, maxsplit, rsplit(), splitlines(), and regex delimiters.

Deepak Prasad5 min read
programming

Python startswith()

Learn how Python startswith() works with simple examples. Check if a string starts with a prefix, use start and end positions, match multiple prefixes with a tuple, and perform case-insensitive startswith checks.

Bashir Alam4 min read
programming

Python Set

Learn Python sets with simple examples. See how to create a set, add and remove items, check membership, remove duplicates, and use union, intersection, difference, symmetric difference, issubset, issuperset, and …

Deepak Prasad7 min read
programming

Python Static Method

Learn what a static method is in Python and how to use @staticmethod. See examples, static method vs class method vs instance method, when to use static methods, and common mistakes.

Bashir Alam6 min read
programming

Append String in Python

Learn how to append to a string in Python using +, +=, f-strings, format(), and join(). Understand why Python strings have no append() method and when to use each approach.

Deepak Prasad6 min read
programming

Check if String Contains Substring in Python

Learn how to check if a string contains a substring in Python using the in operator, find(), index(), count(), and regex. See case-sensitive, case-insensitive, multiple substring, whole-word, and pattern matching …

Deepak Prasad6 min read
programming

Python String Format

Learn Python string formatting using f-strings, str.format(), and percent formatting. See examples for variables, numbers, decimal precision, padding, alignment, percentages, dates, and %d meaning in Python.

Deepak Prasad6 min read
programming

Replace String in File Using Python

Learn how to replace text in a file using Python. See examples for replacing a string in the same file, writing to a new file, handling large files, using fileinput with backup, and regex replacement with re.sub().

Deepak Prasad4 min read
programming

Python Tuple

Learn what a tuple is in Python with simple examples. See how to create tuples, access items, use indexing and slicing, unpack tuples, compare tuples with lists, and use tuple methods.

Deepak Prasad8 min read
programming

Check Type in Python

Learn how to check the type of a variable in Python using type() and isinstance(). See when to use each method, how to check multiple types, and how type hints differ from runtime type checking.

Deepak Prasad8 min read
programming

Python yield Keyword

Learn what yield means in Python and how it creates generator functions. Understand yield vs return, next(), for loops, generator expressions, yield from, and common mistakes with simple examples.

Deepak Prasad6 min read
programming

Python writelines() Method

Learn Python writelines() method with examples. Write a list of strings to a file, add newline characters, append lines, compare write() vs writelines(), and avoid common mistakes.

Bashir Alam4 min read
programming

Python Write to File

Learn how to write to a file in Python using with open(). Create a new file, overwrite an existing file, append data, write multiple lines, and avoid common file mode mistakes.

Deepak Prasad5 min read
programming

Python While Loop with Multiple Conditions

Learn how to use multiple conditions in a Python while loop using and, or, not, parentheses, and two-condition examples. Understand when the loop stops and how to avoid infinite loops.

Deepak Prasad6 min read