Published onMarch 19, 2023Using SequenceMatcher for String and Sequence Similarity in PythonPythonUse SequenceMatcher to measure similarity as a numeric value.
Published onAugust 4, 2022What is the `extend` Method in Python?PythonThe extend method adds each element of an iterable individually to a list.
Published onAugust 3, 2022What is `startswith()` in Python, and how is it used?pythonIt is useful for checking if a specific string starts with a desired prefix.
Published onAugust 2, 2022What is Python's `__add__` method?pythonOOPAll data types in Python are defined as classes.
Published onMarch 27, 2022Understanding Shallow and Deep Copy in Python with the `copy` ModulePythonData-Structure`Shallow copy` copies only the outer shell, whereas `deep copy` copies everything.
Published onAugust 27, 2021How to Use `List Comprehensions` in PythonpythonWrite elegant one-liners to create lists without traditional for loops.
Published onAugust 25, 2021Binary Search in Python Using the `bisect` ModulepythonalgorithmSimplify binary search with bisect module.
Published onAugust 23, 2021Simplifying File I/O in Python with `with - as`pythonLearn how 'with - as' statement makes file handling simpler, safer, and more readable.
Published onAugust 22, 2021What is `inf` in Python?pythonIt is useful for setting initial values in algorithms that find minimum or maximum values.
Published onAugust 21, 2021What is the `zip` function in Python?pythonThe `zip` function merges elements from multiple iterables into pairs, just like a zipper.
Published onAugust 20, 2021Using Character Constants in Python's `string` ModulepythonThe `string` module includes built-in sets such as lowercase and uppercase alphabets, as well as digits.
Published onAugust 18, 2021Understanding the `map` Function in PythonpythonTry using `map` instead of loops to write Pythonic code.
Published onMay 10, 2021Initializing a character with an empty value in CCPythonData-Structure`string[0] = ''` is not allowed in C.
Published onMarch 9, 2021Handling uppercase and lowercase transformations in PythonPython`capitalize()`, `title()`, `upper()`, `lower()`, `swapcase()`
Published onJanuary 25, 2021Blank filling issue with `center()` functionPython`center()` function fills the space with blanks while centering.
Published onJanuary 13, 2021How to check installed modules in PythonPythonpip list, pip freeze, pydoc modules, python -c 'help("modules")'
Published onJanuary 12, 2021Understanding `Variable-length unpacking` in PythonPythonx, y, *z = [1, 2, 3, 4, 5]
Published onJanuary 11, 2021Swapping list elements using `Tuple Unpacking` in PythonPythonx, y = y, x
Published onJanuary 10, 2021Multiplying elements in a Python listPythonUsing `prod()` if you use Python over 3.8