How Do You Get The Logical xor Of Two Variables In Python?

In this tutorial, we will discuss How do you get the logical xor of two variables in Python where we know that XOR (exclusive or) uses ‘^’ operator to perform XOR between two variables. Now here we will perform this operation over two variables and try to find the result. Logical Operator There are different … Read more

Some Basic Python Tuple Programs-3

Some Basic Python Tuple Programs-3

Python program to find the minimum and maximum value in a list of tuples tuple_list = [(6, 5), (3, 8), (1, 6), (4, 7), (3, 1)] ele1 = tuple(map(max, zip(*tuple_list))) ele2 = tuple(map(min, zip(*tuple_list))) print(ele1, el2) #Output: (6, 8) (1, 1) The built-in max() function returns the largest element in an iterable. The built-in min() … Read more

%d bloggers like this: