Answers for "how to do sort in python without sort function"

1

how to do sort in python without sort function

x = 10
y = 5
 
# Code to swap 'x' and 'y'
 
# x now becomes 15
x = x + y
 
# y becomes 10
y = x - y
 
# x becomes 5
x = x - y
print("After Swapping: x =", x, " y =", y)
Posted by: Guest on February-24-2022

Code answers related to "how to do sort in python without sort function"

Python Answers by Framework

Browse Popular Code Answers by Language