- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 9415 Articles for Python

Updated on 27-Feb-2023 11:44:47
Carnot cycle is the most fundamental gas power cycle. This is the cycle which acts as a benchmark for any engine cycle. Each and every engine cycle efficiency is checked against the Carnot Cycle. If an inventor develops a new engine cycle, then it has to be validated against the benchmark, i.e., the Carnot Cycle. All thermodynamic cycle has an upper limit established by the Carnot cycle. It comprises of two reversible adiabatic processes and two isothermal processes, in total four processes. Isothermal processes involve the addition and rejection of heat, whereas reversible adiabatic processes involve work interactions. A ... Read More
Updated on 20-Feb-2023 17:51:14
Let us now dive into what a custom object in python is. We know that python provides us with a lot of pre-defined datatypes which can be used to store various types of data. But there are times where we have to define custom datatypes that can store data that cannot be represented by built-in datatypes. For this purpose, python provides us “classes”, these classes help us customize and create that is fit for our needs. A class can have data and function to implement some behavior. An example of implementing a class in python is as follows − class ... Read More
Updated on 20-Feb-2023 15:57:46
In this article, you will find out how to use Python to find the first and last elements of a tuple in this tutorial. The quick response is that you can access the first and last elements of the tuple in Python using the index operator([]). The methods described here can be used to obtain your single tuple element. Before diving in to the solution let us understand tuple in python. What is tuple in Python? A tuple is one of Python's four built-in data types for storing data collections. The other three are list, set, and dictionary, each ... Read More
Updated on 20-Feb-2023 15:56:41
A dictionary in python is a data structure which stores a collection of key value pairs. Unlike other data structures a dictionary contains 2 value at a particular place. A dictionary is a collection which is ordered, mutable and does not allow duplicate elements. A dictionary can be created by placing a sequence of elements within curly { } brackets , separated by ‘comma’ ( , ) . Dictionary holds pairs of values, one being the key and the other corresponding pair element being its value. Values in a dictionary can be of any data type and ... Read More
Updated on 20-Feb-2023 15:55:54
In Python, searching for elements within a data structure is a common task and different types of data structures should aim to provide efficient methods for searching. The problem of searching involves finding a specific element within a container and returning a value if it is not found. One data structure that can be used for this task is a tuple, which stores a collection of different types of data in a single variable. These items can be accessed by their index and Python offers various methods to work with them. Tuples are immutable, meaning that once created, they cannot ... Read More
Updated on 20-Feb-2023 15:54:55
One of the most common problems in computer science is the problem of searching. To check whether a given element exists in a variable is important and sometimes the item we must search for, can be the maximum, minimum, most frequent etc. in this article we will see how we can find the largest element in a tuple. We know that tuple is a pre-defined datatype that stores heterogenous data. It is sort of a container that holds several items inside it. We can define a tuple in python using the round brackets enclosing the data that we ... Read More
Updated on 17-Feb-2023 14:34:03
Tuples are an important data type in Python and are often used to store a fixed set of elements. In this article, we will be discussing how to pass a tuple as function arguments in Python. We will go over the syntax for passing tuple arguments and will provide examples of how to do so. Let us first understand the basics that, we will be needing to begin approaching the problem. The problem asks us to pass a tuple as a function argument, for that we need to know what a function in python is, what are function arguments, ... Read More
Updated on 17-Feb-2023 14:29:44
In Python, tuples are an immutable sequence type that is commonly used to store a collection of items. We can define a tuple in python using the round brackets enclosing the data that we wish to store − Var = (1, ‘a’, 3.7) There are times when we must use a single variable that has the elements of two or more different tuples. In those cases, we must know the ways we can merge them to create a single variable. In this article, we will be discussing how to merge two tuples in Python. Using + ... Read More
Updated on 17-Feb-2023 14:28:34
In Python, it is often necessary to check if a tuple is empty in order to determine what actions to take in a program. A tuple in python is a pre-defined datatype that stores heterogeneous data, data of different types, in a single variable. The items can be indexed for further operations and python provides a wide array of methods to work upon them. They are immutable by nature which means we cannot make changes after we have created a tuple. This is whenever we perform some operation on the tuple a new tuple with resulting values is created. ... Read More
Updated on 17-Feb-2023 14:27:44
In Python, tuples are immutable, meaning that once they are created, their elements cannot be modified. However, there may be times when you need to add elements to a tuple. In this article, we will be discussing how to add elements to a tuple in Python. We will go over the syntax for adding elements to a tuple and will provide examples of how to do so. Python tuples are very similar to Python lists, in that you can perform all the various operations that can be performed on lists. The only difference is that tuples cannot be modified after ... Read More Advertisements