Untitled
unknown
plain_text
2 months ago
356 B
1
Indexable
def swapper(a, b): """Swaps the values of two variables. Args: a: The first variable. b: The second variable. Returns: A tuple containing the swapped values (b, a). """ return b, a # Example usage: x = 5 y = 10 print(f"Before swap: x = {x}, y = {y}") x, y = swapper(x, y) print(f"After swap: x = {x}, y = {y}")
Editor is loading...
Leave a Comment