@rvgl wrote:
I have the following 2 doubts related to Operators in Python:
1. Floor Division:
print(5//2) o/p -> 2
print(-5//2) o/p -> -3 I do not understand the logic behind this division, why is the o/p = -3, and not as -2?2. Membership Operator:
y = {3:‘a’,4:‘b’}
print(3 in y) -> True
print(‘b’ in y) -> False Why is this FALSE?
Posts: 2
Participants: 2