Advanced Shell Variable Operations

Variable Deletion and Replacement Removing Prefix Patterns Removing the shortest matching prefix pattern using #: greeting="Hello World, Welcome to Shell" echo $greeting greeting_clean=${greeting#*or} echo $greeting_clean Removing the longest matching prefix pattern using ##: greeting_long=${greeting##*or} echo $greeting_long String ...

Posted on Fri, 08 May 2026 14:00:10 +0000 by netpants

Python Fundamentals: Constants, Variables, Comments, and Data Types

# Basic output statement print("hello world") Python code executes line by line from top to bottom. Execution stops if an error occurs. Constants Constants represent immutable values that remain unchanged during program execution. By convention, they are written in uppercase letters. # Examples of constants A = 10 PI = 3.14159 COMPAN ...

Posted on Fri, 08 May 2026 10:26:36 +0000 by ploiesti

Python Fundamentals: Variables, Data Structures, and Control Flow

Variables and Data Types Variables A variable name must start with a letter or undercsore, and can only contain letters, digits, and underscores. For instance, message_1 is valid, but 1_message is not. Variable names cannot contain spaces; use underscores to seperate words. greeting_message works, while greeting message causes an error. Avoid ...

Posted on Thu, 07 May 2026 04:12:03 +0000 by voltrader