# Tag Archives: Python-Operators

Operators are used to perform operations on values and variables. These are the special symbols that carry out arithmetic and logical computations. The value the… Read More
Operators are used to perform operations on values and variables. These are the special symbols that carry out arithmetic and logical computations. The value the… Read More
Predict the output of these two expressions on Python console On console Geek = (1, 2, [8, 9]) Geek[2] += [3, 4] Output: Explanation: Look… Read More
Operator.countOf() is used for counting the number of occurrences of b in a. It counts the number of occurrences of value. Syntax : Operator.countOf(freq =… Read More
Operator Overloading means giving extended meaning beyond their predefined operational meaning. For example operator + is used to add two integers as well as join… Read More
Both “is” and “==” are used for object comparison in Python. The operator “==” compares values of two objects, while “is” checks if two objects… Read More
In python a += b doesn’t always behave the same way as a = a + b, the same operands may give different results under… Read More
Python Operators in general are used to perform operations on values and variables. These are standard symbols used for the purpose of logical and arithmetic… Read More
What is the output of the following program : i = 0 while i < 3:        print i        i++        print i+1 (A) 0 2 1… Read More
Which operator is overloaded by the or() function? (A) || (B) | (C) // (D) / Answer: (B) Explanation: or() function overloads the bitwise OR… Read More
Which function overloads the >> operator? (A) more() (B) gt() (C) ge() (D) None of the above Answer: (D) Explanation: rshift() overloads the >> operatorQuiz… Read More
What is the output of the following code : print 9//2 (A) 4.5 (B) 4.0 (C) 4 (D) Error Answer: (C) Explanation: The ‘//’ operator… Read More