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
Видео Why You Shouldn't Use the Global Keyword in Python канала Tech With Tim
💻 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
Видео Why You Shouldn't Use the Global Keyword in Python канала Tech With Tim
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Local and Global Variable Lookup Weirdness in Python](https://i.ytimg.com/vi/9v8eu4MOet8/default.jpg)
![Why You Should Not Learn to Code (as an ex-Google programmer)](https://i.ytimg.com/vi/wwbM63-LFD4/default.jpg)
![](https://i.ytimg.com/vi/vKoZjEoRgHE/default.jpg)
![11 Tips And Tricks To Write Better Python Code](https://i.ytimg.com/vi/8OKTAedgFYg/default.jpg)
![Python Tutorial: Variable Scope - Understanding the LEGB rule and global/nonlocal statements](https://i.ytimg.com/vi/QVdf0LgmICw/default.jpg)
![You should put this in all your Python scripts](https://i.ytimg.com/vi/g_wlZ9IhbTs/default.jpg)
![Python Tutorial: if __name__ == '__main__'](https://i.ytimg.com/vi/sugvnHA7ElY/default.jpg)
![The Fastest Way to Loop in Python - An Unfortunate Truth](https://i.ytimg.com/vi/Qgevy75co8c/default.jpg)
![10 Python Tips and Tricks For Writing Better Code](https://i.ytimg.com/vi/C-gEQdGVXbk/default.jpg)
![How To Use JSON In Python](https://i.ytimg.com/vi/-51jxlQaxyA/default.jpg)
![Python Object Oriented Programming (OOP) - For Beginners](https://i.ytimg.com/vi/JeznW_7DlB0/default.jpg)
![How to PASS a Coding Interview - Tips, Advice & Resources](https://i.ytimg.com/vi/ckW4cUqui_w/default.jpg)
![Python Decorators in 15 Minutes](https://i.ytimg.com/vi/r7Dtus7N4pI/default.jpg)
![Data Classes in Python Are The New Standard](https://i.ytimg.com/vi/ojrbuVKblew/default.jpg)
![you need to learn Python RIGHT NOW!! // EP 1](https://i.ytimg.com/vi/mRMmlo_Uqcs/default.jpg)
![Expert Python Tutorial #2 - Dunder/Magic Methods & The Python Data Model](https://i.ytimg.com/vi/z11P9sojHuM/default.jpg)
![A* Pathfinding Visualization Tutorial - Python A* Path Finding Tutorial](https://i.ytimg.com/vi/JtiK0DOeI4A/default.jpg)
![Python Tutorial: Using Try/Except Blocks for Error Handling](https://i.ytimg.com/vi/NIWwJbo-9_8/default.jpg)
![Python Asynchronous Programming - AsyncIO & Async/Await](https://i.ytimg.com/vi/t5Bo1Je9EmE/default.jpg)
![The Complete Python Course For Beginners](https://i.ytimg.com/vi/sxTmJE4k0ho/default.jpg)