سرگرمی و طنز ورزشی کارتون و انیمیشن علم و فن آوری خودرو و وسایل نقلیه آموزش موسیقی و هنر اخبار و سیاست حیوانات و طبیعت بازی حوادث مذهبی
In this part, we're going to revisit the topic of mutable and immutable objects. This concept is masked pretty well in Python, which, like dynamic typing, can be great... or not. It can really bite you one day if you don't have a good understanding of how it works, so let's talk about it.

Playlist: https://www.youtube.com/playlist?list=PLQVvvaa0QuDeAams7fkdcwOGBpGdHpXln

#python #programming #tutorial

quiz:

x = 1
def test():
x = 2
test()
print(x)


x = 1
def test():
global x
x = 2
test()
print(x)


x = [1]
def test():
x = [2]
test()
print(x)


x = [1]
def test():
global x
x = [2]
test()
print(x)


x = [1]
def test():
x[0] = 2
test()
print(x)