Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
#17 Python Tutorial for Beginners | Swap 2 Variables in Python
Play lesson

Python for Beginners (Full Course) | Programming Tutorial - #17 Python Tutorial for Beginners | Swap 2 Variables in Python

Unlock Python Mastery: Dive into 75+ Engaging Tutorials and Transform Your Programming Skills with Telusko Today!

5.0 (1)
23 learners

What you'll learn

Understand and set up Python development environments using PyCharm and Jupyter Notebook.
Learn to work with various Python data types, variables, and operators.
Master Python programming fundamentals, including loops, conditional statements, and functions.
Gain proficiency in file handling, error management, and utilizing Python libraries like NumPy for data manipulation.

This course includes

  • 17.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Check out our courses: Java Spring Boot AI Live Course: https://go.telusko.com/JavaSpringBootAI Coupon: TELUSKO20 (20% Discount) AI Powered DevOps with AWS - Live Course :- https://go.telusko.com/AIDevOps-AWS Coupon: TELUSKO20 (20% Discount) Master Java Spring Development : https://go.telusko.com/masterjava Coupon: TELUSKO20 (20% Discount) For More Queries WhatsApp or Call on : +919008963671 website : https://courses.telusko.com/ Udemy Courses: Spring: https://go.telusko.com/udemyteluskospring Java:- https://go.telusko.com/udemyteluskojava Java Spring:- https://go.telusko.com/Udemyjavaspring Java For Programmers:- https://go.telusko.com/javaProgrammers Python : https://go.telusko.com/udemyteluskopython Git : https://go.telusko.com/udemyteluskogit Docker : https://go.telusko.com/udemyteluskodocker Instagram : https://www.instagram.com/navinreddyofficial/ Linkedin : https://in.linkedin.com/in/navinreddy20 TELUSKO Android App : https://go.telusko.com/TELUSKOAPP TELUSKO IOS App : https://apple.co/3SsgmU2 Discord : https://discord.gg/D8hWe9BqfF In this lecture we are discussing about different ways to swap two numbers: -- suppose we have two variables a and b and we want to swap the value of a and b -- we can do this by directly assigning the value of b to a and a to b lead to loose of value of a and b -- we can do this by using temp variable -- we can do this by using xor operator -- we can do this by using python technique # directly assigning leads to loose of value a=5 b=6 a=b print(a) 6 print(b) 6 a=5 # resign the value of a to 5 # use temp variable for swapping temp=a a=b b=temp print(a) 6 print(b) 5 #without using third variable we can swap the value a=a+b b=a-b a=a-b print(a) 5 print(b) 6 #use of xor operator for swapping a=a^b b=a^b a=a^b print(a) 6 print(b) 5 # in python we have another technique a,b=b,a print(a) 5 print(b) 6 Github :- https://github.com/navinreddy20/Python- Python for Beginners :- http://bit.ly/3JOLQhl Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN Check out our website: www.telusko.com courses.telusko.com Subscribe to our other channel: Navin Reddy : https://www.youtube.com/channel/UCxmkk8bMSOF-UBF43z-pdGQ Telusko Hindi : https://www.youtube.com/channel/UCitzw4ROeTVGRRLnCPws-cw Donation & Support: Indian Payment : https://www.instamojo.com/@NavinReddy/ PayPal Id : navinreddy20 Patreon : navinreddy20

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere