diff --git a/swaping of variables b/swaping of variables index 22a78b5..24821de 100644 --- a/swaping of variables +++ b/swaping of variables @@ -7,10 +7,13 @@ y = 10 #x = input('Enter value of x: ') #y = input('Enter value of y: ') -# create a temporary variable and swap the values -temp = x -x = y -y = temp +# used a simple trick to swaping variable + +#temp = x +#x = y +#y = temp + +x,y=y,x print('The value of x after swapping: {}'.format(x)) print('The value of y after swapping: {}'.format(y))