Utkarsha Nathani

Utkarsha Nathani

21 Articles Published

Articles by Utkarsha Nathani

Page 2 of 3

Python Program to Remove a Subset from a List

Utkarsha Nathani
Utkarsha Nathani
Updated on 27-Mar-2026 5K+ Views

In Python programming, removing specific elements or subsets from a list is a common operation. Python provides several built-in methods like remove(), pop(), del, and clear() to handle different removal scenarios efficiently. What is a List in Python A list is a mutable, ordered data structure that can store multiple elements of different data types. Lists allow duplicate elements and support indexing, slicing, and various operations for adding or removing elements. # Creating a simple list numbers = [10, 20, 30, 40, 50] print("Original list:", numbers) # Lists can contain mixed data types mixed_list = ...

Read More

Python Program to Split a List into Two Halves

Utkarsha Nathani
Utkarsha Nathani
Updated on 27-Mar-2026 7K+ Views

In Python, lists are one of the most versatile data structures for storing collections of items. Sometimes you need to split a list into two equal or nearly equal parts for processing, analysis, or other operations. What is a List? Lists in Python are created using square brackets and can contain multiple data types including integers, strings, and objects. Since lists are mutable, you can modify them after creation, making them highly flexible for data manipulation. In this article, we will explore methods for dividing a list into two halves using Python programming. These techniques will help ...

Read More

Python Program to Get Minimum and Maximum from a List

Utkarsha Nathani
Utkarsha Nathani
Updated on 27-Mar-2026 11K+ Views

Python lists are mutable, ordered collections that can store multiple elements. Finding the minimum and maximum values from a list is a common operation with several approaches available. Finding Minimum Value from List Using min() Function The min() function returns the smallest element from a list or any iterable. It works with both numbers and strings ? numbers = [15, 58, 30, 97] minimum = min(numbers) print("The smallest element is:", minimum) The smallest element is: 15 For strings, min() returns the lexicographically smallest value ? names = ["alina", ...

Read More

Draw a Tic Tac Toe Board Using Python – Turtle

Utkarsha Nathani
Utkarsha Nathani
Updated on 11-Oct-2023 2K+ Views

The wide range of libraries and tools makes python a popular and widely used programming language. One of the library which we will use in this article to complete the task of drawing a tic tac toe is Turtle. This library helps in creating graphics by using a virtual turtle. The commands are given to the virtual turtle on the window. In this article, we will use simple functions of the turtle library to draw the tic tac toe. What is Tic Tac Toe Board? Tic tac toe is a popular game, played on a 3*3 grid board. The ...

Read More

Draw a Tree Using Arcade Library in Python

Utkarsha Nathani
Utkarsha Nathani
Updated on 11-Oct-2023 463 Views

Python is a modern programming language. The wide range of features, such as extensive libraries, simple syntax etc. has increased its popularity in different fields such as web development, data science, and many more. In this article, we will be using one of the libraries of python which is Arcade. This library will help us build a tree using different structures. What is Arcade Library? The arcade library was developed for creating more appealing graphics for games and other graphical applications. Less number of choices gave rise to a different library which became a modern python module. This ...

Read More

Draw a Unstructured Triangular Grid as Lines or Markers in Python using Matplotlib

Utkarsha Nathani
Utkarsha Nathani
Updated on 11-Oct-2023 405 Views

Python is a popularly used programming language. It offers a wide range of tools and libraries which can be used for solving different problems, one of them is Matplotlib. This library provides various functions for data visualization and creating different plots. In this article, we will be using Matplotlib for drawing an unstructured triangular grid as liners or markers in python. What is Matplotlib and How to Install it? Matplotlib is one of the libraries of python. This library is very strong tool for serving the purpose of plotting graphs for visualizing data. It has a module named “pyplot” ...

Read More

Draw an Arc Using Arcade in Python

Utkarsha Nathani
Utkarsha Nathani
Updated on 11-Oct-2023 410 Views

Python is an extensively used programming language. The presence of wide range of libraries and tools makes it a popular language. One of the libraries of python is Arcade. This library works as a multimedia library and provides graphic tools for the creation of 2D games, objects used in graphic applications and many more. In this article, we will be drawing an arc using Arcade library in Python. We will be using two different methods for completing the task provided to us. Let’s start by understanding the basics of Arcade library. Arcade Library Arcade library was developed for ...

Read More

How to Calculate and Plot the Derivative of a Function Using Python – Matplotlib?

Utkarsha Nathani
Utkarsha Nathani
Updated on 11-Oct-2023 5K+ Views

The Derivative of a function is one of the key concepts used in calculus. It is a measure of how much the function changes as we change the output. Whereas Matplotlib is a plotting library for python, since it does not provide a direct method to calculate the derivative of a function you need to use NumPy, which is also one of the python libraries and you can use it to calculate the derivative of a function and Matplotlib for visualizing the results. In this article, we will be calculating the derivative of a function using the NumPy ...

Read More

How to Change the Line Width of a Graph Plot in Matplotlib?

Utkarsha Nathani
Utkarsha Nathani
Updated on 11-Oct-2023 2K+ Views

Matplotlib one of the libraries of python, which plays an important role in beautifying plots and making the data analysis and data visualization an easier task. You can use Matplotlib for experimenting, by using different options available in it and creating a more appealing, informative plot. One common customization in Matplotlib is changing the line width of a graph plot. Since, line width controls the thickness of the lines, which are used in the plots at various points such as in connecting the plot points, etc. In this article, we will be learning how to change the line ...

Read More

Draw a Sun Using Arcade Library Python

Utkarsha Nathani
Utkarsha Nathani
Updated on 13-Sep-2023 751 Views

Python is a highly multipurpose programming language with a vast network of libraries and frameworks that has capabilities beyond the standard language features. Arcade is one of the libraries used for creating graphics and handling user input. It uses basic shapes like circles and lines, a gradient approach, and many other techniques for creating attractive graphics. In this article, we will learn different methods for drawing a sun using the Arcade library in Python. Arcade Library and Its Features Arcade library is a Python library built on top of Pyglet, a multimedia library for python. It is a python library ...

Read More
Showing 11–20 of 21 articles
Advertisements