24. Python Program to Swap Two Variables Without a Temporary Variable
MediumHow they work
Overview
Swap values between variables efficiently.
Problem Statement
Swap values of two variables without a temporary variable.
Constraints:
- Initialize
a = 5andb = 10 - After swapping, print both values
- Do not use any temporary variable
Input
- No input required
Output
10 5