MTmaham tariqinmahamtariq58.hashnode.dev·Dec 5, 2023 · 3 min readPython DictionariesDictionaries in Python is a collection that is used to store values in key: value pairs. A dictionary is ordered, changeable and does not allow duplicates. The values in dictionary items can be of any data type. Create Dictionary: # empty dictionary ...00
MTmaham tariqinmahamtariq58.hashnode.dev·Nov 24, 2023 · 6 min readTuples and SetsTuples Tuples are in-built data structures in Python that are similar to lists, except that tuples are immutable (i.e., contents cannot be changed). Creating a Tuple # empty tuple t = () # tuple with single item t = ('hello',) # Homogeneous tuple ...00
MTmaham tariqinmahamtariq58.hashnode.dev·Nov 8, 2023 · 7 min readPython ListsLists are the commonly used data structure in Python, that allows you to store a collection of items, which can be of different data types in a single variable. Lists act like a dynamic array, which means you can add more elements when required. Mem...00
MTmaham tariqinmahamtariq58.hashnode.dev·Nov 1, 2023 · 5 min readStrings in PythonBackground In 1968, the American Standard Code for Information Interchange or ASCII was a standard system to define numeric codes for various characters, ranging from 0 to 127. However, ASCII does not define the accented characters such as in French ...00
MTmaham tariqinmahamtariq58.hashnode.dev·May 29, 2023 · 5 min readControl flow StatementsIn Python, a control structure mechanism is used to alter the flow of execution based on certain conditions. This feature allows you to make decisions and repeat actions as required. The main control structures in Python are : Conditional Statements...00