@awdev_6: Python list trick #programming #awdev_6

CodeStra
CodeStra
Open In TikTok:
Region: DZ
Wednesday 29 April 2026 23:00:34 GMT
36688
1802
34
60

Music

Download

Comments

69diekatze
69Katze :
yea it trickede last month
2026-07-31 15:11:56
0
markisbatman
markisbatman :
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
thatguykaden
Everyone :
God, what an awful language
2026-04-30 14:54:55
8
killeroblivin
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
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
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
sraza9
Raza :
always assign a var... thats pretty error prone
2026-05-02 19:37:50
0
maahobilli
M Khan :
So why are you not passing the list name?
2026-04-30 07:03:38
2
pythonnik
pythonnik :
Python the best👌
2026-05-10 12:59:25
0
greatest.comeback22
Greatest Comeback Reviews :
nice
2026-04-30 22:43:25
1
seven_seas510
Elijah Wood :
wait...WHAT?
2026-05-10 18:12:24
0
mr.zeusie
Mr.Zeusie :
pass by reference
2026-05-02 03:42:13
1
beginhan
harukami🦈 :
what about using del function after return? or it's not possible?
2026-05-05 16:29:11
0
tiktok_xpert
Davy Jones 🏴‍☠️ :
Make a class and use self and call
2026-04-30 20:22:23
1
ishak.alllaoui
ishak Alllaoui :
It’s good 😊
2026-05-02 07:50:18
1
xerathwsfafscts
Xerath :
Second!
2026-04-30 02:31:39
1
greatest.comeback22
Greatest Comeback Reviews :
reference
2026-04-30 22:42:42
1
markjohnson572
Mark :
❤️❤️❤️
2026-05-29 14:46:05
0
xddvitwin
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.

Other Videos


About