Python program to swap two numbers

    
        # Get input from the user
        num1 = float(input("Enter the first number: "))
        num2 = float(input("Enter the second number: "))

        # Display the numbers before swapping
        print(f"Before swapping: num1 = {num1}, num2 = {num2}")

        # Swap the numbers using a temporary variable
        temp = num1
        num1 = num2
        num2 = temp

        # Display the numbers after swapping
        print(f"After swapping: num1 = {num1}, num2 = {num2}")
    
Output:
    
        Enter the first number: 33
        Enter the second number: 54
        Before swapping: num1 = 33.0, num2 = 54.0
        After swapping: num1 = 54.0, num2 = 33.0