Global and Local Variables in Python
Global Variable: A variable defined and declared outside a function or in global scope is known as a global variable. Such
What’s range() and xrange() in Python?
range() and xrange() are both built-in functions in Python which in a given range are used to generate whole numbers
What are *args and **kwargs in python functions?
Let us first consider this piece of code which has a function named summation() which adds up numbers. Example: def summation(p,q):
Is Python Slower than C++/Java?
Yes! It is. Python is an interpreted programming language whereas Java and C++ are compiler-based programming languages. The answer to our
Why does C++ compilation take so long?
During the process of conversion of the source code which is in a high-level language to the machine code(binary), two
Compiler v/s Interpreter
A software program designed or used to perform tasks such as processing source code to machine code is known as
How to read a file line-by-line into a list in Python?
Read a file line-by-line into a list These are the prerequisites required before we jump into the solution:
How to print without newline or space in Python?
Python’s print() function ends with a newline by default. So, if we use print(variable) then Python appends a newline to
How to get line count of a large file in Python?
In this article, we’ll discuss two efficient ways to find the count of the number of lines, as low as
What is tail recursion?
A recursive function becomes a tail recursive function when the last thing executed by the function is the recursive call.