Swap Two Variables

  1. Write a program that exchanges (swaps) two variables var1 and var2, both str type.

    To output the values before and after the swap operation, use the print() function like so,

    print('Before:', var1, var2)
    print('After:', var1, var2)
    

Dependencies

cluster_python Python cluster_python_basics Basics cluster_python_basics_exercises Exercises python_basics_python_0120_helloworld Hello World python_basics_python_0110_blahblah Blahblah python_basics_python_0120_helloworld->python_basics_python_0110_blahblah python_basics_python_0160_boolean Boolean python_basics_python_0150_datatypes_overview Datatypes python_basics_python_0160_boolean->python_basics_python_0150_datatypes_overview python_basics_python_0140_variables Variables python_basics_python_0150_datatypes_overview->python_basics_python_0140_variables python_basics_python_0130_syntax_etc Syntax etc. python_basics_python_0130_syntax_etc->python_basics_python_0120_helloworld python_basics_python_0140_variables->python_basics_python_0130_syntax_etc python_basics_exercises_boolean Boolean Expressions python_basics_exercises_boolean->python_basics_python_0160_boolean python_basics_exercises_variable Swap Two Variables python_basics_exercises_variable->python_basics_python_0120_helloworld python_basics_exercises_variable->python_basics_python_0150_datatypes_overview python_basics_exercises_variable->python_basics_python_0140_variables python_basics_exercises_variable->python_basics_exercises_boolean