This is why i prefer C/C++ you can be very explicit with your definitions. The reason the "my_list" doesn't reset is because it is a statically allocated object, aka it lives on the global memory. In C you have to explicitly call this "static"
2026-06-04 21:40:55
0
Everyone :
God, what an awful language
2026-04-30 14:54:55
8
killer oblivin :
wait so python has static lists that are attached to functions? why would you want that?
2026-04-30 16:57:47
4
dkabal 🇧🇷 :
This one got me some years ago. And I was already an advanced programmer writing a method to a complex class. .
2026-06-15 15:41:30
0
TechnoTerrier :
oh why is this so, doesn't this break scope? or is it because mylist is created and fed into a function and so lives above the function?
2026-05-13 12:57:42
0
Raza :
always assign a var... thats pretty error prone
2026-05-02 19:37:50
0
M Khan :
So why are you not passing the list name?
2026-04-30 07:03:38
2
pythonnik :
Python the best👌
2026-05-10 12:59:25
0
Greatest Comeback Reviews :
nice
2026-04-30 22:43:25
1
Elijah Wood :
wait...WHAT?
2026-05-10 18:12:24
0
Mr.Zeusie :
pass by reference
2026-05-02 03:42:13
1
harukami🦈 :
what about using del function after return? or it's not possible?
2026-05-05 16:29:11
0
Davy Jones 🏴☠️ :
Make a class and use self and call
2026-04-30 20:22:23
1
ishak Alllaoui :
It’s good 😊
2026-05-02 07:50:18
1
Xerath :
Second!
2026-04-30 02:31:39
1
Greatest Comeback Reviews :
reference
2026-04-30 22:42:42
1
Mark :
❤️❤️❤️
2026-05-29 14:46:05
0
xddvi-twin :
1 like
2026-04-29 23:03:59
2
To see more videos from user @awdev_6, please go to the Tikwm
homepage.