From 2d2b6fab7e8edf38282a9fb6185ded8818b6f561 Mon Sep 17 00:00:00 2001 From: Rajat Arya <36148932+rajat1478@users.noreply.github.com> Date: Thu, 3 Oct 2019 03:11:02 +0530 Subject: [PATCH] Update function.py --- function.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/function.py b/function.py index c0fd4e2..7c392ab 100644 --- a/function.py +++ b/function.py @@ -1,6 +1,12 @@ -def hello(): - print("hello") - print("hello again") -hello() - #again calling -hello() +def swap(x, y): + temp = x; + x = y; + y = temp; + +# Driver code +x = 2 +y = 3 +swap(x, y) +print(x) +print(y) +