Found 10476 Articles for Python

Python program that renders a dictionary from two list with K values

Niharika Aitam
Updated on 02-Aug-2023 11:34:06

177 Views

A Dictionary is an unordered collection of data structure which stores the elements as key and value. It is mutable and in other programming languages Dictionaries are also known as associative arrays, hash maps, or hash tables. The key is the unique one and the values are of a single element or a list of elements with duplicates. A Dictionary can be created by using the curly braces {} or by using the built in function dict(). Let’s see an example of creating the dictionary in python. Example student = { 'name': 'Tutorialspoint', 'age': ... Read More

Progress Bars in Python

Niharika Aitam
Updated on 02-Aug-2023 11:33:09

3K+ Views

Progress bars in Python are visual indicators that provide feedback on the progress of a task or operation. They are useful for long-running processes or iterations where it's helpful to show how much work has been completed and how much is remaining. A progress bar typically consists of a visual representation, such as a horizontal bar or a textual representation, which dynamically updates to reflect the progress of the task. It also includes additional information like the percentage of completion, estimated time remaining, and any relevant messages or labels. The following are the purposes served by the progress bars in ... Read More

Programming Paradigms in Python

Niharika Aitam
Updated on 02-Aug-2023 11:32:03

4K+ Views

Programming paradigm is a specific approach or style of programming that provides a framework for designing and implementing computer programs. It encompasses a set of principles, concepts, and techniques that guide the development process and the structure of the code. Different paradigms have different ways of solving problems, organizing code, and expressing computations. The below are the various programming paradigms available in python which makes the developer work easy and more efficient. Procedural Programming Procedural programming focuses on dividing a program into a set of procedures or functions. In Python, we can define functions to perform specific tasks and structure ... Read More

Program to calculate Dooms Day for a year

Niharika Aitam
Updated on 02-Aug-2023 11:30:15

274 Views

The doomsday is also known as the doomsday of the week which is a specific day of the week that falls on the same date every year. The concept of the doomsday is based on the doomsday algorithm, which allows us to determine the day of the week for any given date. The doomsday algorithm was developed by mathematician John Horton Conway and is based on the idea that certain dates within each year fall on the same day of the week called the doomsday. The doomsday occurs on the following dates − January 3rd February 7th or 14th ... Read More

Program to access different columns of a multidimensional Numpy array

Niharika Aitam
Updated on 02-Aug-2023 11:28:57

153 Views

Numpy is the most powerful library in python for computing numerical data. It provides multidimensional arrays, along with different collections of functions and modules to work with arrays. Its efficient array operations, broadcasting capabilities, and integration with other libraries make it a go-to choice for data manipulation, analysis, and modeling tasks. The following are the key features and functionalities of the Numpy library. Multidimensional arrays Array creation Array operations Indexing and Slicing Vectorized operations Numerical Routines Integration with other libraries Performance Open source and community support Creation of an array In Numpy library we have the functions called ... Read More

Ways to Check if a given String in Python Contains Only Letters

Aayush Shukla
Updated on 01-Aug-2023 14:08:16

352 Views

Python is used by programmers all over the world for different purposes such as web development, data science, machine learning and to perform various different processes with automation. In this article we are going to learn about different ways to check if a given string in python contains only characters. Different Methods to check if a given string contains only letters Isalpha Function This is the simplest method of checking if a given string in python contains letters. It will give the output as true and false as per the presence of letters in the string. Let’s take an example ... Read More

Union Operation of two Strings using Python

Aayush Shukla
Updated on 02-Aug-2023 18:18:47

683 Views

Python is a very commonly used language by programmers all over the world for different purposes such as machine learning, data science, web development and to perform many other operations with automation. It has many different features which help us to work on many different projects. One such feature of python is the union operation. The union operation means to combine two different strings into one common string after removing all the common elements in both the string. In this article we are going to learn about different methods which can be used for union operation of two strings. Different ... Read More

Removing the Initial Word from a String Using Python

Aayush Shukla
Updated on 01-Aug-2023 13:54:20

186 Views

Python is a commonly used programming language used for many different purposes such as Web development, data science, machine learning and to perform many different processes with automation. In this article we will learn how to remove the initial word from a string using python. Different Methods to Remove Initial Word from a String Split Function In this method we will split the strings into substring to remove the initial string. We will use the split function for the same purpose. The syntax to be used for removing the initial word from a string using split function is as follows: ... Read More

Remove the given Substring from the End of a String using Python

Aayush Shukla
Updated on 01-Aug-2023 13:37:38

140 Views

Python is a globally used programming language used for different purposes by developers. Python has various different applications such as Web Development, Data Science, Machine Learning and also to perform different processes with automation. All the different programmers using python have to deal with strings and substrings. So in this article we are going to learn how to remove the substring present at the end of a string. Different Methods to Remove Substrings Using Functions We are going to use the endswith() function which help us to remove the substring present at the end of a string. To understand it ... Read More

Remove Substring list from String using Python

Aayush Shukla
Updated on 01-Aug-2023 13:34:05

249 Views

Python is a very useful software used commonly by people spread all over the world to perform many different functions as per their personal need. It is used for many different purposes such as Data Science, Machine Learning, Web Development and to perform different processes with automation. It has many different features which help us to perform the above mentioned tasks but with so many features present within python, users have to face issues also. One such common issue faced by the user is to remove substring from a string. Many−a−times multiple substrings are also to be removed from one ... Read More

Advertisements