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

Python programming Can I swap numbers like C pointers in python? do

not return numbers in the swap function. In python The result I

The result I want

want In C: 0 M!/usr/bin/env python3 I # -*- coding: utf-8 -*-

In C:

2 3 def swap(a, b) 4 tempa btemp print("in the swap function",

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!