Skip to content

Different swapping techniques, that are mainly focused on python.

Notifications You must be signed in to change notification settings

BhargavKadali39/Swapping_in_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

Swapping_in_python

Swapping is the most common this in logic designing. swapping in the OG's book.

x = 10
y = 20

temp = x
x = y
y = temp
print(x,y)

Output: 20 10

I agree that the old swapping technique works everytime,but it also increases the amount of code required. So let's learn some new swapping tricks.

Before going into the context lemme tell you the advantage of them,

  • Integrating it into your code can make use of less instances than normally required.
  • Improves logical thanking.
  • Less wastage of resources.

About

Different swapping techniques, that are mainly focused on python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages