-
Python Pattern Matching With Regular Expressions
Search for a value Some variable data type such as string, list, set and tuple allow you to search them by using the in keyword Example temp_list = [1, 2, 3] # Create a list with elements 1, 2, 3temp_string = “Hello World!” # Create a string variable with value “Hello World!”if 1 in temp_list:…
-
Python Strings
Indexing You can slice a string using smart indexing [] and : or :: Example temp_string = “abcdefghijk” # Create a string variable with value “abcdefghijk”print(temp_string[1:]) # Slice from index 1 to the end and print thatprint(temp_string[2:6]) # Slice from index 2 up to (but not including) index 6 and print thatprint(temp_string[::-1]) # Reverse the…
-
Python Dictionaries
Dictionary A dict is a data type that stores a sequence of key:value pairs (a key is associated with a value). Keys have to be immutable and cannot be duplicated. Notice that dict and set use the same syntax {} . A dict will have key:value pairs, whereas a set, will only have values. Dictionaries…
-
Python Lists
List A list is a data type that stores multiple\any data types in an ordered sequence. It is mutable and one of the most used data types in Python. You can store integers, floats, strings, and so on. Example temp_list = [1, 2, 3, 4, 5] # Create a list named temp_list containing the numbers…
-
Python Functions
Function Structure Function is a reusable block of code that has 2 parts: The following snippet will declare a function, but it won’t execute it: Example def example_1(): # Define a function named example_1 temp_val = 10 # Create a local variable temp_val and assign it the value 10 print(temp_val) # Print the…
-
Python Decision Making and Loops
Control Flow Control Flow in Python refers to the order in which the statements and instructions in a Python program are executed. By default, Python executes code sequentially from top to bottom, but control flow structures allow you to make decisions, repeat actions, or change the execution path based on conditions. The main control flow…
-
Python Basics
Expression A combination of values (E.g. 5) and operators (E.g. +), which will be evaluated to a value Example 9 * 98 # multiplies the numbers (result = 882)/ 1 # divides by 1 (so the value stays 882)print() # displays the result in the console Result Operators Precedence Is the order of operations (PEMDAS)…
-
C Language Compiled Code
C Language Compiled Code C Language Compiled Code refers to the machine-readable version of a program written in the C programming language. When you write C source code in human-readable files (.c and .h), it cannot be executed directly by a computer. A compiler translates this source code through several stages including preprocessing, compilation to…
-
Python Introduction

Computer Programming Computer Programming is the process of designing, creating, testing, and maintaining programs to perform specific tasks or solve particular problems. It involves translating logical solutions into a language computers can understand and execute. Programmers use languages like Python, Java, C++, or JavaScript to write code that instructs computers on how to carry out…
-
Application Layer

Application Layer The Application Layer is the seventh and topmost layer of the OSI model, providing the interface for end users to interact with network services. It acts as a bridge between user applications and the underlying network, allowing software to access communication functions without managing data transport or routing. This layer handles high-level protocols…