High Definition Standard Definition Theater
Video id : mMv6OSuitWw
ImmersiveAmbientModecolor: #e5be98 (color 2)
Video Format : 22 (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: Opus - Normalized audio
PokeTubeEncryptID: e7dbf679e338022ac324e5738f0275b78fcf5dc9af3e73fbecd7ccddf2a0de071e969490a79e7a4803d85e61099b7666
Proxy : eu-proxy.poketube.fun - refresh the page to change the proxy location
Date : 1715917263458 - unknown on Apple WebKit
Mystery text : bU12Nk9TdWl0V3cgaSAgbG92ICB1IGV1LXByb3h5LnBva2V0dWJlLmZ1bg==
143 : true
Python 101: Learn the 5 Must-Know Concepts
Jump to Connections
1,037,506 Views • May 20, 2023 • Click to toggle off description
See NordPass Business in action now with a 3-month free trial here nordpass.com/techwithtim with code techwithtim

If you're interested in becoming a developer that writes any type of code in python, then you need to understand these 5 Python concepts. In today's video, I'm going to break down 5 key Python concepts for any aspiring developer. Master Python, elevate your skills.

💻 Master Blockchain and Web 3.0 development today by using BlockchainExpert: 🔗 algoexpert.io/blockchain (Use code "tim" for a discount!)

💻 Accelerate your software engineering career with ProgrammingExpert: 🔗 programmingexpert.io/tim (Use code "tim" for a discount!)

🎬 Timestamps
00:00 | Introduction
00:38 | Sponsor
01:43 | Mutable vs Immutable
06:20 | List Comprehensions
08:22 | Function Argument & Parameter Types
14:44 | if _name_ == "__main__"
16:34 | Global Interpreter Lock (GIL)

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
👕 Merchandise: 🔗 teespring.com/stores/tech-wit...
📸 Instagram: 🔗 www.instagram.com/tech_with_tim
📱 Twitter: 🔗 twitter.com/TechWithTimm
🔊 Discord: 🔗 discord.gg/twt
📝 LinkedIn: 🔗 www.linkedin.com/in/tim-ruscica-82631b179/
🌎 Website: 🔗 techwithtim.net/
📂 GitHub: 🔗 github.com/techwithtim

One-Time Donations: 💲 www.paypal.com/donate?hosted_button_id=CU9FV329ADN…
Patreon: 💲 www.patreon.com/techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
- Tech With Tim
- Top 5 Python Concepts
- Master Python

⭐️ Hashtags ⭐️
#techwithtim #top5python #pythonprogramming
Metadata And Engagement

Views : 1,037,506
Genre: Education
Date of upload: May 20, 2023 ^^


Rating : 4.9 (739/28,867 LTDR)
RYD date created : 2024-05-17T03:25:28.654238Z
See in json
Tags

YouTube Comments - 580 Comments

Top Comments of this video!! :3

@TechWithTim

11 months ago

Start your career in Software Development and make $80k+ per year! coursecareers.com/a/techwithtim?course=software-de…

30 |

@Gaurav-gc2pm

5 months ago

Working as a python dev and in my 1 year of practicing python... no one ever explained this well... you're a GEM TIM

20 |

@pharrison306

11 months ago

Please do a global interpretor lock, love your explanation style, clear and concise. Keep it up

197 |

@TohaBgood2

10 months ago

The GIL can be bypassed by using parallelism which offers about the same capabilities as threads in other languages. This is more of a naming convention issue rather than an actual thing that you can't do in Python. Python threads are still useful for IO and similar async tasks, but they're simply not traditional threads. It's important to highlight these kinds of things even for beginners so that they don't go out into the world thinking that you can't do parallelism in Python. You absolutely can. It's just called something else.

198 |

@zecuse

11 months ago

Some details skipped about *args and **kwargs: A forward slash "/" can be used to force parameters to be positional only, thereby making them required when calling and not by name. So, def function(a, b, /, c, d, *args, e, f = False, **kwargs) means a and b cannot have default values, are required to be passed when calling function, AND can't be supplied with their parameter names. e must also be supplied with a value when called. Naming the first * is not required. Doing so simply allows the function to take an arbitrary amount of positional parameters. def function(a, b, /, c, d, *, e, f = False) would require at least 5 arguments (no more than 6) passed to it: a and b are required, c and d are also required and optionally passed as keywords, e must be passed as keyword, f is completely optional, and nothing else is allowed. / must always come before *. * must always come before **kwargs. **kwargs must always be last if used.

39 |

@apmcd47

11 months ago

At around the 4 minute mark you are confusing immutability with references. When you do 'y = x' what you are doing is assigning the reference of the object that x is pointing to, to y. When you assign a new object to x it drops the old reference and now refers to a new object, meanwhile y still refers to the original object. You use tuples in this example, but this is true for lists and dicts. When you change to lists, all you are really demonstrating is that x and y refer to the same object. With your get_largest_numbers() example, if you were to pass a tuple into the function you would get an AttributeError because you were passing an immutable object which doesn't have the sort method.

67 |

@zedascouve2

7 months ago

Absolutely brilliant for beginners. Crystal clear. I had countless errors due to the lack of understanding of mutable vs immutable variables

16 |

@Gruuvin1

11 months ago

Because of the GIL, Python multi-threading is not useful for processor-bound computing, but it is still great for I/O bound computing (processor waits for input and output; example: disk read/write or networked data). Multiprocessing is a great way to get around the GIL, when you need to.

15 |

@TonyHammitt

10 months ago

I wanted to mention that the if name is main thing is frequently used for test code for libraries. Your code may have some functions to import elsewhere, then you can do examples in the main of how to use them, or try various failure cases, illustrate how to catch exceptions, etc. Also, to those getting into programming, please do yourself a favor and leave a comment in your code as to what it's for. The most likely person to be reading your code later is you, but if you wrote it 6 months ago, it might as well have been written by someone else, so be kind to yourself.

50 |

@narutoxboruto873

11 months ago

There is an error in the time stamps ,names of function arguments and if __ are interchanged

28 |

@Raven-bi3xn

11 months ago

Great video! It might have been worth it to mention multiprocessing in Python as a way to overcome the multithreading limitation that you reviewed towards the end.

39 |

@basavarajus2061

11 months ago

Thank you you are right on point, we miss these understandings and start scratching our head when we get errors.

1 |

@MuhammetTaskin

4 months ago

Thank you so much. There is a lack of content on the internet about this. In addition to making things clear, it helped me in my programming midterm too.

|

@koflerkohime2981

11 months ago

Great content. Keep it up. However, I believe there is a mistake at 3:34. You mention that we have some sort of automatic "copying" going on with "y = x" when using immutable types. This is actually not correct. The assignment still works exactly like with any other object - the reference x is assigned to y. Identifiers x and y are simply referring to the same 2-tuple object. After that, you change what identifier x is referring to (another 3-tuple) and print out the two individual objects. The identifiers are still references - even if using immutable objects.

25 |

@shaikhyusufniaz759

11 months ago

Hi Tim, Great content as always. Would appreciate a separate detailed video on GIL

5 |

@mariof.1941

11 months ago

Certainly! In addition to multithreading, Python also provides the multiprocessing module, which allows for true parallel execution across multiple processor cores. Unlike multithreading, multiprocessing bypasses the limitations imposed by the Global Interpreter Lock (GIL) since each process gets its own Python interpreter and memory space. By utilizing multiprocessing, you can take advantage of multiple processor cores and achieve parallelism, which can significantly improve performance in computationally intensive tasks. Each process operates independently, allowing for efficient utilization of available CPU resources. However, it's important to consider that multiprocessing comes with some overhead due to the need for inter-process communication. Data exchange between processes can be more involved and slower compared to sharing data between threads within a single process. As a result, multiprocessing may not always be the best choice for every situation. To determine whether to use multithreading or multiprocessing, it's crucial to evaluate the specific requirements and characteristics of your application. If the task at hand is primarily CPU-bound and can benefit from true parallel execution, multiprocessing can be a suitable option. On the other hand, if the workload consists of I/O-bound operations or requires a high degree of coordination and shared state, multithreading might be more appropriate. In summary, the multiprocessing module in Python offers a way to achieve true parallelism by leveraging multiple processor cores. While it circumvents the limitations of the GIL, it introduces additional overhead for inter-process communication, which may impact performance. Careful consideration of the specific requirements and trade-offs is necessary to determine the most suitable approach for your use case.

66 |

@yerneroneroipas8668

11 months ago

This is a great video for someone who is learning python as a second, third, or nth language. These are very python specific implementations of universal concepts and I had been wondering about their purpose when seeing python code.

25 |

@Scobbo

9 months ago

This video made the concepts much easier to understand than others that I have seen. Thanks so much!

|

@andreibaditoiu

7 months ago

Great explanation style, thanks for your work!

1 |

@linatroshka

11 months ago

Thanks for the video! Very consize and informative. The only thing that I would add about the GIL is that it because of it there are no performance advantages when it comes to so-call CPU-bound operations (like summation that was used as an example in the video). But when we are dealing with input/output-bound operations, such as sending a HTTP-request, then multithreading will improve performance, because instead of waiting for response before continuing executing code, we can use that waiting time to make more HTTP-requests. This can help handling multiple requests that are send to your web-applications, for example.

24 |

Go To Top