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, 10 months ago | 1572 views

Tags:- Python

Python | Access Specifiers Python does not make use of access specifiers specifically like private, public, protected, etc. However, it does not derive this from any variables. It has the concept of imitating the behavior of …

Last updated 3 years, 10 months ago | 1571 views

Tags:- Python

Python | Generate random numbers Python provides a module called random using which we can generate random numbers. e.g: print(random.random())     We have to import a random module and call the random() method as shown …

Last updated 3 years, 10 months ago | 1569 views

Tags:- Python

Python modules are the files having python code which can be functions, variables, or classes. These go by .py extension. The most commonly available built-in modules are: os math sys random re datetime JSON

Last updated 3 years, 10 months ago | 1563 views

Tags:- Python

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, 8 months ago | 1559 views

Tags:- Python

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, 8 months ago | 1558 views

Tags:- Windows

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, 10 months ago | 1557 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, 10 months ago | 1556 views

Tags:- Django

[::-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, 8 months ago | 1555 views

Tags:- Python

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, 8 months ago | 1553 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, 10 months ago | 1545 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, 8 months ago | 1544 views

Tags:- Windows

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, 10 months ago | 1535 views

Tags:- Python

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, 10 months ago | 1534 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, 10 months ago | 1530 views

Tags:- Python