
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

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

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

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

837 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

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

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

2K+ Views
Merging two sets means combining all the elements of a set into another set without any duplicates. In Swift, we can either use formUnion() function or for-in loop to merge the elements of two sets. Lets discuss both the methods in detail along with examples. Method 1: Using formUnion() Function To merge two sets we can use formUnion() function. The formUnion() function is used to insert the elements of the given sequence into the set. Here the sequence can be anything a set, array, etc. This function merge two sets without any duplicates. Syntax set1.formUnion(set2) Where set1 and set2 ... Read More

3K+ Views
Introduction Let us try to understand the C# program to get the name of the file from the absolute path. We will see the usage of the GetFileName method which comes under the File class to get the name of the file, and another method GetFileNameWithoutExtension which will return the file name of the specified path string without extension. To get the relative path from two absolute paths, we will make use of the Uri class in C#. The Uri class provides several methods for working with URIs, including MakeRelativeUri, which we will use in our code. A file is ... Read More

1K+ Views
In Swift, a set is used to define a unordered collection of unique elements. To iterate over an set swift provide inbuilt forEach() function as well as for-in loop. Lets discuss both the methods in detail along with examples. Method 1: Using for-in Loop To iterate over an set we can use for-in loop. The for-in loop iterate through each element of the set and display them on the screen one by one. Syntax for x in newSet{ print(x) } Where newset is the name of the set, and x variable store the current element from ... Read More

358 Views
Introduction Let us see how to use the instrumental environment class of C# to write a C# Program to Get and Print the Command Line Arguments Using Environment Class. Knowing all the things about C#, we will now understand one of the uses of the system.environment class in C# and then we will learn to code a program that will get and print the command line arguments. Basically, it will take strings as arguments and will have its return type as a string. Before diving into the program we must have an overview of what is environment class in detail ... Read More