Why You Shouldn't Use the Global Keyword in Python
In this Python lesson, I'll be going over why you should never use the 'global' keyword in your code. Often times, you'll hear me and others say you shouldn't use the global keyword, but you never really hear why. I'll be demystifying the global keyword and explaining why you shouldn't use the global keyword in Python and why it's generally recommended you do not use it.
💻 AlgoExpert is the coding interview prep platform that I used to ace my Microsoft and Shopify interviews. Check it out and get a discount on the platform using the code "techwithtim" https://algoexpert.io/techwithtim
⭐️ Chapters ⭐️
0:00 | Intro
0:48 | Global vs local variables
08:15 | Using the global keyword
16:41 | Why you shouldn't use the global keyword
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: https://tech-with-tim.teachable.com/p/the-fundamentals-of-programming-with-python
👕 Merchandise: https://teespring.com/stores/tech-with-tim-merch-shop
🔗 Social Medias 🔗
📸 Instagram: https://www.instagram.com/tech_with_tim
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/twt
📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/
🌎 Website: https://techwithtim.net
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim
🎬 My YouTube Gear 🎬
🎥 Main Camera (EOS Canon 90D): https://amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): https://amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): https://amzn.to/2Yuol5r
🕹 Tripod: https://amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): https://amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): https://amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): https://amzn.to/3oi0v8Z
☀️ Lights: https://amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): https://amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): https://amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): https://amzn.to/2B2IXcQ
📢 Speaker (Beats Pill): https://amzn.to/2XYc5ef
🎧 Headphones (Bose Quiet Comfort 35): https://amzn.to/2MWbl3e
🌞 Lamp (BenQ E-reading Lamp): https://amzn.to/3e0UCr8
🌞 Secondary Lamp (BenQ Screenbar Plus): https://amzn.to/30Dtafi
💻 Monitor (BenQ EX2780Q): https://amzn.to/2HsmUPZ
💻 Monitor (LG Ultrawide 34WN750): https://amzn.to/3dSD7tS
🎙 Mic Boom Arm (Rode PSA 1): https://amzn.to/30EZw9m
🎚 Audio Interface (Focusrite Scarlet 4i4): https://amzn.to/2TjXsih
💸 Donations 💸
💵 One-Time Donations: https://www.paypal.com/donate?hosted_button_id=CU9FV329ADNT8
💰 Patreon: https://www.patreon.com/techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
- Python lesson
- Global keyword
⭐️ Hashtags ⭐️
#PythonLesson #GlobalKeyword
-
1:06:53
Tech With Tim
8 months agoReact Trivia Game Tutorial - Beginner React Project
144 -
1:46:24
Glenn Greenwald
6 hours agoThe Pentagon's Secret Disinfo Campaign Discrediting China's COVID Vaccine Unveiled; France's Unprecedented Elections, China, Ukraine, and More with Commentator Arnaud Bertrand | SYSTEM UPDATE #285
55.5K129 -
40:31
Michael Franzese
5 hours agoHow Russian scammers make MILLIONS from INSURANCE FRAUD | Sitdown with Michael Franzese
40.1K15 -
39:09
Candace Owens
6 hours agoI Say Ban Porn, Cardi B Defends It | Candace Ep 8
43.5K117 -
1:37:06
2 MIKES LIVE
6 hours ago2 MIKES LIVE #80 NEWS BREAKDOWN WEDNESDAY!
38.1K4 -
54:53
LFA TV
17 hours agoDems Begin Attacks on SCOTUS in Preparation for 2024 Election Steal | Trumpet Daily 6.19.24 9pm EST
28.6K6 -
1:25:54
TENET Media
5 hours agoGuest Mark Fitzpatrick, ‘Hetero Awesomeness Month’ Bar Owner, Biden’s Amnesty Plan | The MC Hour #31
18.1K1 -
33:31
Patriots With Grit
5 hours agoHow 'Ya Gonna Call | Brett Miller
25K1 -
1:16:26
RealitySurvival
6 hours agoNATIONAL PREPPER SITREP - We Have Big Problems!
22.3K5 -
1:42:37
The Quartering
7 hours agoKamala Harris Replaced With Hillary, Biden's Short Circuit Problem, Fauci Admits Another Bombshell
61.4K66