NANaved Ahmadinnavedwrites.hashnode.dev·Feb 14, 2024 · 3 min readPython file operationsWhat is file operations? Python file operations refer to the manipulation and interaction with files on the file system using Python code. File operations in Python typically involve opening files, reading or writing data to them, and closing them af...00
NANaved Ahmadinnavedwrites.hashnode.dev·Feb 12, 2024 · 4 min readDictionaries and SetsDictionaries In Python, a dictionary is a collection of key-value pairs, where each key is unique and associated with a value. Dictionaries are mutable, meaning they can be modified after creation. They are useful for storing and retrieving data in a...00
NANaved Ahmadinnavedwrites.hashnode.dev·Feb 2, 2024 · 2 min readLoops in PythonIn Python, loops are control structures that allow you to repeatedly execute a block of code based on a certain condition. Types of loops There are two main types of loops in Python: for loops and while loops. 1. for Loop: The for loop is used to ite...00
NANaved Ahmadinnavedwrites.hashnode.dev·Feb 1, 2024 · 3 min readLists and TuplesWhat are Lists? Lists are mutable, meaning their elements (values) can be changed after the list is created. Lists are defined using square brackets []. Elements in a list are separated by commas. Here's an example of a list: # Example of a list...00
NANaved Ahmadinnavedwrites.hashnode.dev·Jan 30, 2024 · 2 min readConditional handlingConditional handling in Python involves using if, else, and optionally elif (short for "else if") statements to control the flow of a program based on certain conditions. Here are some examples to illustrate the usage: 1. Simple if Statement: # Examp...00