Python - Indexing & Slicing
{% raw %} Indexing & Slicing in general is a foundational concept which roots to the usage of all data structures or containers. Indexing & Slicing is a fundamental concept in Python, espec...
{% raw %} Indexing & Slicing in general is a foundational concept which roots to the usage of all data structures or containers. Indexing & Slicing is a fundamental concept in Python, espec...
{% raw %} Write a function greet that takes a name as an argument and prints a greeting message.Write a function sum_two that takes two numbers as arguments and returns their sum.Write a function i...
{% raw %} Think of a function as a little helper in your code. It’s like a recipe that you can use over and over again. Instead of writing the same steps every time you cook a dish, you write down...
{% raw %} Create a program that takes two numbers and an operator (+, -, *, /) as input and performs the corresponding arithmetic operation.Write a program that takes an integer as input and checks...
{% raw %} In this blog, we’ll cover three fundamental concepts: operators, conditionals, and getting user input with the input() function. By the end, you’ll have a good grasp of how to use them in...
{% raw %} Unlike other programming languages, in Python, variable is not a container but just a reference or a name/label to the object. Caution: This post deals with memory management, which might...
{% raw %} The ARG directive in a Dockerfile is used to define variables that users can pass at build time to the builder with the docker build command. These variables behave similarly to environm...
{% raw %} The ENV directive in a Dockerfile can be used to set environment variables. Environment variables are key-value pairs that provide information to applications and processes running insid...
{% raw %} Create a variable named name and assign your name to it. Then print the value of the variable.Create a variable age and assign your age to it. Later, reassign the variable with a new valu...
{% raw %} Variables A variable in Python is a symbolic name that references or points to an object. Once a variable is assigned a value, it can be used to refer to that value throughout the progra...