YouTube Excerpt: 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 : # all variables are actually references to objects in memory. Thus, when a function is called with a parameter, the reference to the object is passed by value. # For immutable data types like integers, floats, and strings, changes made to the parameter inside the function do not affect the original value of the parameter outside the function. This is because any changes made to the parameter create a new object in memory, and the original reference to the object remains unchanged. # For mutable data types like lists and dictionaries, changes made to the parameter inside the function do affect the original value of the parameter outside the function. This is because the reference to the object remains the same, but the contents of the object can be modified. def update(lst): print(id(lst)) lst[1]=25 print(id(lst)) print("x",lst) lst = [10,20,30] print(id(lst)) update(lst) print(lst) # The above code defines a Python function called update that takes a list lst as a parameter. The function first prints the memory address of the list using the id() function. It then modifies the second element of the list by assigning it the value 25. The function then prints the new memory address of the list and the updated list. # The code then creates a list called lst with the values [10, 20, 30] and prints its memory address using the id() function. The update function is then called with the lst parameter. Since lists are mutable objects in Python, the memory address of the list is passed to the function, making it a pass by reference. # Inside the update function, the second element of the list is modified to 25. Since lists are mutable objects and the memory address of the original list is passed to the function, this change affects the original list outside the function. The new memory address and the updated list are printed inside the function. Python Tutorial to learn Python programming with examples Complete Python Tutorial for Beginners Playlist : https://www.youtube.com/watch?v=hEgO047GxaQ&t=0s&index=2&list=PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3 Python Tutorial in Hindi : https://www.youtube.com/watch?v=JNbup20svwU&list=PLk_Jw3TebqxD7JYo0vnnFvVCEv5hON_ew Github :- https://github.com/navinreddy20/Python- Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN Editing Monitors : https://amzn.to/2RfKWgL https://amzn.to/2Q665JW https://amzn.to/2OUP21a. Subscribe to our other channel: Navin Reddy : https://www.youtube.com/channel/UCxmk... Telusko Hindi : https://www.youtube.com/channel/UCitz... Donation: PayPal Id : navinreddy20 Patreon : navinreddy20 http://www.telusko.com/contactus
Check out our courses: Java Spring Boot AI Live Course: https://go.telusko.com/JavaSpringBootAI Coupon: TELUSKO20 (20% Discount) AI Powered...
Curious about #33 Python Tutorial For Beginners | Function Arguments In Python's Color? Explore detailed estimates, income sources, and financial insights that reveal the true scope of their profile.
color style guide
Source ID: ijXMGpoMkhQ
Category: color style guide
View Color Profile ๐
Disclaimer: %niche_term% estimates are based on publicly available data, media reports, and financial analysis. Actual numbers may vary.
Sponsored
Sponsored
Sponsored