Python Sequences includes Strings, Lists, Tuples, etc. We can merge elements of a Python sequence using different ways. Let’s see some examples of iteration over a List in reverse order. Iterate in Reverse Order using while loop Example In this example, we have a List as a sequence and iterate it in reverse order using the while loop − # Creating a List mylist = ["Jacob", "Harry", "Mark", "Anthony"] # Displaying the List print("List = ", mylist) # Length - 1 i = len(mylist) - 1 # Iterate in reverse order print("Display the List in Reverse order ... Read More
First, we will see how to convert Tuple into a List in Python. Convert Tuple with Integer Elements into a List To convert Tuple to a List, use the list() method and set the Tuple to be converted as a parameter. Example Let’s see the example # Creating a Tuple mytuple = (20, 40, 60, 80, 100) # Displaying the Tuple print("Tuple = ", mytuple) # Length of the Tuple print("Tuple Length= ", len(mytuple)) # Tuple to list mylist = list(mytuple) # print list print("List = ", mylist) print("Type = ", type(mylist)) Output Tuple = ... Read More
To read or write a binary file, at first you need to understand the different file modes for Binary Files in Python − Mode Description rb Opens a file for reading only in binary format. The file pointer is placed at the beginning of the file. This is the default mode. rb+ Opens a file for both reading and writing in binary format. The file pointer placed at the beginning of the file. wb Opens a file for writing only in binary format. Overwrites the file if the file exists. If the ... Read More
In this article, we will learn the new features in Python 3.10, compared to 3.9. Let’s see the features − Parenthesized context managers Using enclosing parentheses for continuation across multiple lines in context managers is now supported. This allows formatting a long collection of context managers in multiple lines in a similar way as it was previously possible with import statements User-Defined Type Guards TypeGuard has been added to the typing module to annotate type guard functions and improve information provided to static type checkers during type narrowing. Enhanced error messages If you will get an error while running a ... Read More
To delete a file, use the remove() method in Python. Pass the name of the file to be deleted as an argument. Let us first create a file and read the content: We will display the contents of a text file. For that, let us first create a text file amit.txt with the following content − The file amit.txt is visible in the Project Directory − Display the contents of a text file Let us now read the contents of the above file # The file to be read with open("amit.txt", "r") as myfile: my_data ... Read More
Functional programming languages are specially designed to handle symbolic computation and list processing applications. Functional programming is based on mathematical functions. Some of the popular functional programming languages include: Lisp, Python, Erlang, Haskell, Clojure, etc. Characteristics of Functional Programming The most prominent characteristics of functional programming are as follows − Functional programming languages are designed on the concept of mathematical functions that use conditional expressions and recursion to perform computation. Functional programming supports higher-order functions and lazy evaluation features. Like OOP, functional programming languages support popular concepts such as Abstraction, Encapsulation, Inheritance, and Polymorphism. Advantages of Functional Programming ... Read More
If we have a huge data where hyperlinks have been scattered throughout the worksheet, then it becomes a tedious task to find the hyperlinks and external references. This tutorial will help a user to find the hyperlinks available in a worksheet in the following scenarios − Find all the hyperlinks in Excel Find all the hyperlinks linked to a specific text Find all hyperlink locations with VBA Code Find All Hyperlinks in Excel Step 1 − A sample worksheet has been shown below with scattered hyperlinks. Step 2 − Please note that, using Find and Replace feature, ... Read More
Excel has a bunch of formulas and data analysts use this application to prepare various reports and dashboards. To support that analysis this article will help an excel user to identify all the cells whose values either starts with a number or an alphabet from a collection of dataset. We will identify these cells using the combination of following formulas. IF function ISERR function Left function Check if first character in a cell is a number or a letter The following formulas can be used to check if the first character of a cell is number or a ... Read More
If we have a dataset in which we need to check if there are any cell values or text which is not required or inappropriate, then the same can be identified in seconds using an excel function. There are many functions through which we can identify specific set of text in cell values of the complete dataset. Let’s have a look at the formulas and example and learn how to implement the same in a dataset. Check if dataset contains one or more values from a specific list Check if dataset contains one or more values ... Read More
When we have a list of entries in excel file and need to identify if there are some entities starting with a specific letter of special character, then looking at each value and counting will be a tedious task to do. This article will help you to find those entities using a formula without looking at each value of the list. Searching Cells containing Specific Character using Formula Searching the cells starting with a specific character Let’s take an example of the following data − Now, if you want to check the cells begin with the character “$” then ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP