Question: Python programming Can I swap numbers like C pointers in python? do not return numbers in the swap function. In python The result I want
Python programming
Can I swap numbers like C pointers in python? do not return numbers in the swap function.
In python


The result I want

In C:

0 M!/usr/bin/env python3 I # -*- coding: utf-8 -*- 2 3 def swap(a, b) 4 tempa btemp print("in the swap function", a, b) 9 def main) print("before swap in main function", a, b) swap (a, b) print("after swap in main function", a, b) 16 if name 'main main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
