Found 26504 Articles for Server Side Programming

Python Program To Search An Element In A List

Utkarsha Nathani
Updated on 21-Apr-2023 15:39:47

9K+ Views

Python is an interpreted, object–oriented, high level, programming language with dynamic semantics. Developed by Gudio Van Rossum in 1991. It supports multiple programming paradigms, including structured, object-oriented and functional programming. List are mutable means that you can change the values of list, like we can add an element, remove, repeat and allows indexing and slicing like strings an element from a list by using different operators. List can be created by using square brackets. By placing elements inside square bracket[ ], separate by commas. For example: list1= [“a”, ”b”]. There is a one more type of list known ... Read More

Python Program To Check Two Set Are Equal

Utkarsha Nathani
Updated on 24-Apr-2023 09:00:26

10K+ Views

Python is an interpreted, object–oriented, high level, programming language with dynamic semantics. Developed by Gudio Van Rossum in 1991. It supports multiple programming paradigms, including structured, object-oriented and functional programming. What Is A Set? Set is an unordered collection data type that iterable, mutable and has no duplicate element. Set is represented by {}. Set is highly optimized method for checking whether a specific element is present in the set. Sets are created by placing all the items or elements inside curly brackets {}, separated by comma, or by using built in “set ()” function. It can have various ... Read More

Python Program to Remove a Subset from a List

Utkarsha Nathani
Updated on 21-Apr-2023 15:33:22

5K+ Views

Python is an interpreted, object–oriented, high level, programming language with dynamic semantics. Developed by Gudio Van Rossum in 1991. It supports multiple programming paradigms, including structured, object-oriented and functional programming. What is a List in Python List is a data structure in python, which is changeable, mutable and iterable ordered sequence of element. They are used to store multiple elements in a single variable. List allows duplicate elements. Lists are mutable which means that you can change the values of list, we can add an element, remove, repeat and allows indexing and slicing like strings an element from a ... Read More

Python Program to Split a List into Two Halves

Utkarsha Nathani
Updated on 21-Apr-2023 15:31:43

7K+ Views

In Python, a single variable can contain multiple items by using lists. One of the four builtin data types for storing data collections in Python is a list; the other three are tuples, sets and dictionaries, each with its own purpose. What Is List? Square brackets are used to build lists.The most effective tool in Python is the list because they don't necessarily have to be homogeneous. DataTypes like Integers, Strings, and Objects can all be found in one list. Because lists are mutable, changes can be made to them even after they have been created. In this article, ... Read More

Python Program to Get Minimum and Maximum from a List

Utkarsha Nathani
Updated on 21-Apr-2023 15:27:28

10K+ Views

Python is an interpreted, object–oriented, high level, programming language with dynamic semantics. Developed by Gudio Van Rossum in 1991. List is a data structure in python, that is changeable, mutable and iterable ordered sequence of element. They are used to store multiple elements in a single variable. List can be created by using square brackets. By placing elements inside square bracket [], separated by commas. For example: list1= [“a”, ”b”]. There is a one more type of list known as “Nested list”. It is list within list. list1=[“a”, ”b”[1, 2]”c”] How To Get Minimum From List Let’s learn ... Read More

Python program to add elements to a list

Utkarsha Nathani
Updated on 21-Apr-2023 15:37:45

587 Views

In this article, we will learn how to add elements in list. In python there many ways to add elements into a list by using different operators. “operators” are special symbols that carries out arithmetic or logical computation. The value that operator operates is known as “operand”. There are many types of operators used in python like” +” for add element, “-” to slicing element , ”*” for repeating the element and etc. List in Python A list is a data structure in python that is mutable or changeable, ordered sequence of elements. List are used to store multiple ... Read More

Python Program to calculate the sum of right diagonal the matrix

Utkarsha Nathani
Updated on 21-Apr-2023 15:08:55

1K+ Views

A well-liked general-purpose programming language is Python. It is applied in a variety of industries, including desktop applications, web development, and machine learning. Fortunately, Python features a straightforward, user-friendly syntax for beginners. Here, in our article we will be using python for calculating the sum of right diagonal of the matrix. What is a Matrix? In mathematics, we use a rectangular arrangement or a matrix, which is used to describe a mathematical object or an attribute of one, it is a rectangular array or table containing numbers, symbols, or expressions that are arranged in rows and columns. For Instance ... Read More

Python Program to calculate the sum of left diagonal of the matrix

Utkarsha Nathani
Updated on 21-Apr-2023 15:07:07

841 Views

Python is a popular, general-purpose programming language that can be used in a wide range of industries, from desktop applications to web development and machine learning. Its straightforward syntax makes it ideal for beginners to get started with coding. In this article, we'll see how Python can be used to calculate “The sum of the left diagonal elements in a matrix”. Matrix In mathematics, we use a rectangular arrangement or a matrix, which is used to describe a mathematical object or an attribute of one, it is a rectangular array or table containing numbers, symbols, or expressions that are ... Read More

C# Program to Read the Content of a File Line by Line

Ankit kumar
Updated on 21-Apr-2023 14:37:49

18K+ Views

Introduction Here, we’ll be learning to write a C# program to Read the content of a file content line by line. There are various methods to do so. We will be discussing them one by one. File handling is done in C#. In most cases, the file is used to store data. File handling or file management in layman’s terms the various processes such as making the file, reading from it, writing to it, appending it, and so on. The reading and writing of files are the two most common operations in file handling. 1. Using File.ReadLines() method ... Read More

C# Program to Get the relative path from two absolute paths

Ankit kumar
Updated on 21-Apr-2023 14:36:44

6K+ Views

Introduction Let us try to understand the C# program to get the relative path from two absolute paths. We will understand using the URI( Uniform resource identifier) class and the MakeRelativeUri method. We will first understand the difference between absolute and relative paths. The absolute path includes all information required to locate a file or directory on a system. An example of an absolute path is C:\Program Files\Google Chrome\filename.exe. The relative path tells us the file's path with respect to the current directory on which the user is working. Considering the similar example mentioned above if the main executable ... Read More

Advertisements