Python Average
Unfortunately, Python does not provide a standard built-in function to calculate the average of a l…
Python Compare Strings
There are 6 comparison operators in Python that return True or False by comparing two operands. And…
Replace Item in Python List
There are many ways to replace item or items from a Python list. We can use indexing, list comprehe…
Merge Two Sorted Arrays in-place
Problem Two integer arrays nums1 and nums2 are sorted in non-decreasing order, and two integers …
Python Float: A Complete Beginner's Guide
Python comes with a built-in function float() that can convert a valid string and integer number to…
Longest subarray with sum as K
Problem statement Given an n-dimensional array of integers, arr[]. The task is to determine the …
Python typeerror: ‘str’ object is not callable Solution
In Python, a string object is a collection of characters inside the single, double or triple invert…
Print all subarrays with 0 sum
Problem Statement: We need to find the subarrays with a sum having exactly 0. A subarray is a co…
Python Int to string Tutorial
To convert a Python integer value to a string, we can use Python's inbuilt str() function. The …
Python ValueError: invalid literal for int() with base 10: Solution
Python provides many inbuilt functions to convert a data type of one object to another, and one of …
Python TypeError: ‘function’ object is not subscriptable Solution
In Python, to call a function, we use the function name followed by parenthesis (), and pass the ar…
Python Error: TypeError: 'tuple' object is not callable Solution
A tuple is an immutable data structure in Python. It is very similar to the Python list and stores …