Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python expression?
24//6%3, 24//4//2

What will be the output of the following Python expression?
24//6%3, 24//4//2
a) (1,3)
b) (0,3)
c) (1,0)
d) (3,1)

Answer: a
Explanation: The expressions are evaluated as: 4%3 and 6//2 respectively. This results in the answer (1,3). This is because the associativity of both of the expressions shown above is left to right.

Join The Discussion