Pawandeep has Published 44 Articles

How to install Python in Windows?

pawandeep

pawandeep

Updated on 26-Feb-2024 11:05:03

189K+ Views

Python is a widely used high-level programming language. To write and execute code in python, we first need to install Python on our system.Installing Python on Windows takes a series of few easy steps.Step 1 − Select Version of Python to InstallPython has various versions available with differences between the ... Read More

How to clear Python shell?

pawandeep

pawandeep

Updated on 31-Oct-2023 03:26:00

21K+ Views

Python provides a python shell which is used to execute a single Python command and display the result. It is also called REPL. REPL stands for Read, Evaluate, Print and Loop. The command is read, then evaluated, afterwards the result is printed and looped back to read the next command.Sometimes ... Read More

How to install matplotlib in Python?

pawandeep

pawandeep

Updated on 31-Aug-2023 01:39:31

153K+ Views

Matplotlib is a Python library that helps to plot graphs. It is used in data visualization and graphical plotting.To use matplotlib, we need to install it.Step 1 − Make sure Python and pip is preinstalled on your systemType the following commands in the command prompt to check is python and ... Read More

How to install OpenCV in Python?

pawandeep

pawandeep

Updated on 26-Aug-2023 03:08:57

32K+ Views

OpenCV is a Python library that is used to solve computer vision problems. Computer vision include understanding and analyzing digital images by the computer and process the images or provide relevant data after analyzing the image.OpenCV is an open-source library used in machine learning and image processing. It performs tasks ... Read More

How to create a DataFrame in Python?

pawandeep

pawandeep

Updated on 25-Aug-2023 01:13:12

32K+ Views

Dataframe is a 2D data structure. Dataframe is used to represent data in tabular format in rows and columns. It is like a spreadsheet or a sql table. Dataframe is a Pandas object.To create a dataframe, we need to import pandas. Dataframe can be created using dataframe() function. The dataframe() ... Read More

How to concatenate two strings in Python?

pawandeep

pawandeep

Updated on 24-Aug-2023 16:21:09

37K+ Views

Concatenating two strings refers to the merging of both the strings together. Concatenation of “Tutorials” and “Point” will result in “TutorialsPoint”.We will be discussing different methods of concatenating two strings in Python.Using '+' operatorTwo strings can be concatenated in Python by simply using the '+' operator between them.More than two ... Read More

How to declare a variable in Python?

pawandeep

pawandeep

Updated on 23-Aug-2023 14:16:00

58K+ Views

In Python, we need not declare a variable with some specific data type.Python has no command for declaring a variable. A variable is created when some value is assigned to it. The value assigned to a variable determines the data type of that variable.Thus, declaring a variable in Python is ... Read More

How to compare two lists in Python?

pawandeep

pawandeep

Updated on 23-Aug-2023 13:50:34

62K+ Views

The list in python is a collection of similar items. We may at times need to compare data items in the two lists to perform certain operations. We will discuss certain methods to compare two lists in python.Using list.sort() and == operatorThe list.sort() method sorts the two lists and the ... Read More

How to read JSON file in Python

pawandeep

pawandeep

Updated on 23-Aug-2023 03:50:38

68K+ Views

What is a JSON file?JSON stands for JavaScript Object Notation. It is commonly used for transmitting data in web applications (such as sending data from server to client to display on the web pages).Sample JSON FileExample 1: {    "fruit": "Apple",    "size": "Large",    "color": "Red" }Example 2: { ... Read More

How to print in same line in Python?

pawandeep

pawandeep

Updated on 22-Aug-2023 02:09:21

102K+ Views

The print() method in Python automatically prints in the next line each time. The print() method by default takes the pointer to the next line.Example Live Demofor i in range(5):    print(i)Output0 1 2 3 4Modify print() method to print on the same lineThe print method takes an extra parameter end=" ... Read More

Advertisements