Negative indexes mean that you count from the right instead of the left. So, list[-1] refers to the last element, list[-2] is the second-last, and so on.

Last updated 3 years, 4 months ago | 1377 views

Tags:- Python

Interpreted language An Interpreted language executes its statements line by line. Languages such as Python, Javascript, R, PHP, and Ruby is a prime examples of Interpreted languages. Programs written in an interpreted language runs directly from …

Last updated 3 years, 4 months ago | 1375 views

Tags:- PHP Python

Django follows a Model-View -Template (MVT) architecture which is a variant of the MVC architecture.  Model: Logical data structure behind the entire app and signified by a database. A model is used in Django to …

Last updated 3 years, 2 months ago | 1369 views

Tags:- Django

Windows | Set path and environment variables in Windows Vista and Windows 7 On the desktop, right-click the Computer icon and select Properties. or Press the  and right-click the Computer option in the Start menu, and select Properties. Click the Advanced System Settings link in the left column. In …

Last updated 3 years, 2 months ago | 1366 views

Tags:- Windows

Python | What are decorators A decorator in Python is a function that modifies the behavior of an existing function or class without any modification to the original source code.  A decorator takes another function as its argument and returns yet …

Last updated 3 years, 2 months ago | 1364 views

Tags:- Python

Python has a multi-threading package, but commonly not considered good practice to use it as it will result in increased code execution time. Python has a constructor called the Global Interpreter Lock (GIL). The GIL ensures …

Last updated 3 years, 4 months ago | 1364 views

Tags:- Python

Django | Middleware  Middleware is something that executes between the request and response. In simple words, you can say it acts as a bridge between the request and response. Similarly In Django when a request is made …

Last updated 3 years, 4 months ago | 1363 views

Tags:- Django

Python | PYTHONPATH  PYTHONPATH is an environment variable that you can set to add additional directories where Python will look for modules and packages. This is especially useful in maintaining Python libraries that you do not wish …

Last updated 3 years, 4 months ago | 1361 views

Tags:- Python

Python is an interpreted language, that executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, Python is a Dynamically Typed Language.   Typing refers to type-checking in programming …

Last updated 3 years, 4 months ago | 1358 views

Tags:- Python

Windows | Set path and environment variables in Windows 2000 and Windows XP On the desktop, right-click the Computer icon and select Properties. or Press the  and right-click the Computer option in the Start menu, and select Properties. In the System Properties window, click the Advanced tab. In the Advanced tab, click …

Last updated 3 years, 2 months ago | 1357 views

Tags:- Windows

Finalize method is used for freeing up the unmanaged resources and cleaning up before the garbage collection method is invoked. This helps in performing memory management tasks.

Last updated 3 years, 4 months ago | 1356 views

Tags:- Python

The answer here is no. The modules with circular references to other objects, or to objects referenced from global namespaces, aren’t always freed on exiting Python. Plus, it is impossible to de-allocate portions of memory …

Last updated 3 years, 4 months ago | 1355 views

Tags:- Python

Python | Pass Statement The pass statement is used as a placeholder for future code. It represents a null operation in Python. It is generally used for the purpose of filling up empty blocks of …

Last updated 3 years, 4 months ago | 1353 views

Tags:- Python

Python | namedtuple A namedtuple will let us access a tuple’s elements using a name/label. We use the function namedtuple() for this, and import it from collections. >>> from collections import namedtuple #format >>> result=namedtuple('result','Physics Chemistry …

Last updated 3 years, 4 months ago | 1352 views

Tags:- Python

Python | *args and **kwargs  *args is a special syntax used in the function definition to pass variable-length arguments. e.g: myFun(*argv) def func(*args): for i in args: print(i) func(2,3,4) #Output 2 3 4   **kwargs is …

Last updated 3 years, 4 months ago | 1351 views

Tags:- Python