Python | append() and extend() Function Both append() and extend() methods are methods used to add elements at the end of a list. append(element): append() method adds the given element at the end of the list. …

Last updated 3 years, 9 months ago | 1528 views

Tags:- Python

[::-1] is used to inverse the order of a sequence. >>> my_list = [1,2,3,5,6,7,8,9] >>> my_list[::-1] [9, 8, 7, 6, 5, 3, 2, 1]    

Last updated 3 years, 6 months ago | 1523 views

Tags:- Python

Python | Module and Package Module: The module is a simple Python file that contains collections of functions and global variables and with having a .py extension file. It is an executable file and to organize all …

Last updated 3 years, 9 months ago | 1521 views

Tags:- Python

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, 9 months ago | 1518 views

Tags:- 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, 6 months ago | 1516 views

Tags:- Django

Difference between Python array and Python list Array Lists it is used to store only homogeneous data. The list is used to store heterogeneous data it occupies less amount of memory as the array stores …

Last updated 3 years, 6 months ago | 1509 views

Tags:- Python

Django | Check Version  To check for the version of Django installed on your system, you can open the command prompt and enter the following command: python -m django –version You can also try to import …

Last updated 3 years, 8 months ago | 1509 views

Tags:- Django

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, 6 months ago | 1508 views

Tags:- Windows

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, 6 months ago | 1507 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, 6 months ago | 1506 views

Tags:- Python

Django | Session Framework Using the session framework, you can easily store and retrieve arbitrary data based on the pre-site-visitors. It stores data on the server side and takes care of the process of sending and …

Last updated 3 years, 8 months ago | 1498 views

Tags:- Django

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, 9 months ago | 1492 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, 9 months ago | 1490 views

Tags:- Python

Django | Disadvantages  Django has the following disadvantages: Django's modules are bulky. It is completely based on Django ORM. Components are deployed together. We must know the full system to work with it.

Last updated 3 years, 8 months ago | 1488 views

Tags:- Django

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, 9 months ago | 1485 views

Tags:- Python