Please Master These 10 Python Functions…

  Рет қаралды 170,313

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 128
@TechWithTim
@TechWithTim 3 ай бұрын
I have a free introduction course on how to land a developer job in 2024 here: techwithtim.net/dev
@MansiBansalc
@MansiBansalc 3 ай бұрын
For the first time ever i understood how lambda functions work. Thankyou so much Tim!!
@kuldeep7063
@kuldeep7063 Ай бұрын
For this problem you should refer a structured course...
@miiguliexe1787
@miiguliexe1787 Ай бұрын
@@kuldeep7063 should they? seems like this video was good enough for them
@DrsJacksonn
@DrsJacksonn 12 сағат бұрын
Seeing usages of the zip, enumerate and map functions in other people's code has definitely shown me their utility and I've been applying them myself ever since.
@mrdjangofreeman5560
@mrdjangofreeman5560 3 күн бұрын
Thx Tim, crystal clear, fast, accurate Vs. the purpose. Great job 😊
@ameldancalippo6912
@ameldancalippo6912 3 ай бұрын
Nice simple explanations that start you thinking of how you can use these functions. Exactly how you want to feel when learning a language.
@johnbennett1465
@johnbennett1465 4 ай бұрын
Print also takes a file argument to write to a file.
@christoph231090
@christoph231090 3 ай бұрын
These "basic" videos are very nice. Thanks for that one.
@raghunathansundaresan8017
@raghunathansundaresan8017 3 ай бұрын
I've always been using key argument in sorted function by trial and error. Finally I understood. Thanks Tim great video as usual!
@RemyDelaCruz
@RemyDelaCruz 4 ай бұрын
Used some of these for a recent class, and this serves as a refresher! Great content.
@johnbennett1465
@johnbennett1465 4 ай бұрын
Using enumerate(tasks, 1) makes the code even cleaner. The second parameter is the start value.
@Joeadamu
@Joeadamu 3 ай бұрын
This is true then what about the full stop after the number because you don't wanna be using a comma...
@johnbennett1465
@johnbennett1465 3 ай бұрын
@@Joeadamu all my change does is use enumeration values from 1 to N instead of 0 to N-1. You also remove the " + 1" from the print call. Everything else remains unchanged. In this case it is a small improvement. In more complicated cases it can make the code noticeable clearer and reduce the chances of off by one errors.
@Joeadamu
@Joeadamu 3 ай бұрын
@@johnbennett1465 Oh yeah... I get your point, thanks for the clarification :)
@fancypants6062
@fancypants6062 3 ай бұрын
omg I can't believe I never knew about this. I use enumerate so much. Thank you.
@johnbennett1465
@johnbennett1465 3 ай бұрын
@@fancypants6062 you're welcome.
@softwareengineer8923
@softwareengineer8923 3 ай бұрын
Thanks a lot Tim, it was such a helpful recap for me. Keep up the high quality content.
@mukmusicdiary
@mukmusicdiary 2 ай бұрын
Any chance you could make a video on how to properly study and retain programming? I find myself repeat myself with the same stuff because I can't memorize what I'm learning. It would be amazing to see how you studied and practised programming.
@odieshehabaldmary8880
@odieshehabaldmary8880 Ай бұрын
keep practice and write lot of scripts and you will memorize it without noticing . I learned this way
@Alex_Underwad
@Alex_Underwad 25 күн бұрын
Understanding how the code is structured is more important than memorizing functions. Being skilled in web searching and utilizing forums such as stack overflow are probably more useful than memorizing. Every coder searches for definitions or asks forums when they get stuck.
@joeeeyyyyyy
@joeeeyyyyyy 16 күн бұрын
Start projects and be relatively ambitious - more than you know how do to do but not massive projects. Think 'how do you do basic ____ work?' (Gui, classes, functions, structuring a app, docker, etc...) If you apply the knowledge you are much more likely to remeber. Good luck!
@legojenn
@legojenn 4 ай бұрын
Thanks! I never understood lambda functions. I overcomplicated it.
@Chiramisudo
@Chiramisudo 3 ай бұрын
They're just anonymous / unnamed functions. JavaScript, C#, and many other languages have the same concept.
@jimalix6270
@jimalix6270 3 ай бұрын
Extremely helpful video! Thanks so much!
@johnbennett1465
@johnbennett1465 4 ай бұрын
Zip takes a strict argument when it is important that the lists are the same length. Without it zip can hide bugs in your list generation.
@kapibara2440
@kapibara2440 3 ай бұрын
Thank you for the video Tim 😃
@souris_a_boule5695
@souris_a_boule5695 4 ай бұрын
For the sum function, there is a cool thing you can do with the start argument. You can put any type that support the + operator. So for example if you want to flatten a list of list you can pass it with start=[] and it will get the job done
@johnbennett1465
@johnbennett1465 4 ай бұрын
Interesting. I tried to use it to append strings and it doesn't work. Since the error message explicitly says to use join, it must be explicitly checking for.
@souris_a_boule5695
@souris_a_boule5695 3 ай бұрын
@@johnbennett1465 Ah that's weird I tried it with a list and it works so I assumed that it work with any object that support + operator. Guess I'm wrong
@souris_a_boule5695
@souris_a_boule5695 3 ай бұрын
After some research I found out that the sum function specificaly "ban" string for optimization reason and encourage you to use join instead. I don't know if other types are checked
@johnbennett1465
@johnbennett1465 3 ай бұрын
@@souris_a_boule5695 thanks for the information. I should have guessed this. I am aware of the performance issues.
@dragonfly-7
@dragonfly-7 2 ай бұрын
Hi Tim ! #10 @18:03. I didn't know that I'm able to both read to a file and write from a file ... You'll never stop learning ... 😉
@avvarutheja
@avvarutheja 3 ай бұрын
What is the advantage of map and filter functions, the same can be achieved with single line list_comprehension aswell. Curious to know what are the added advantages of using these map & filter functions. My approach for the items discussed in the video are : strings = ["my", "world", "apple", "pear"] l_comp = [len(i) for i in strings] print(l_comp) l_append = [i + "s" for i in strings] print(l_append) l_filterd = [i for i in strings if len(i) >4] print(l_filterd)
@alimihakeem841
@alimihakeem841 3 ай бұрын
Tim, Thanks so much. I do love your content. It's valuable
@ralvarezb78
@ralvarezb78 3 ай бұрын
I often use lambda functions with filter and map
@sun-prairie
@sun-prairie 3 ай бұрын
thanks for the excellent intro to functions
@jayd_ee
@jayd_ee 3 ай бұрын
Thank you so much ❤️
@mosesmbadi
@mosesmbadi 20 күн бұрын
Hi, awesome video. I have a quick question, what tool do you use to record your videos?
@SagangaKapaya
@SagangaKapaya Ай бұрын
Thanks, this was very helpful to me.
@ExDarkx3
@ExDarkx3 3 ай бұрын
i always swap out map/filter for list/dict comprehensions just because of readability. I feel like the only time time ill ever use them is if im using a terribly large dataset and im facing memory issues with list comprehensions. Even so, im in devops so i rarely face that problem
@RoyZennet
@RoyZennet 2 ай бұрын
Woah that append seems useful for me Sorry too newbie, just started to learn about 2 days ago
@jamesharrington233
@jamesharrington233 3 ай бұрын
Very informative, thank you!
@SchwarzschildM
@SchwarzschildM 3 ай бұрын
Any chance to have all of the functions within Jupiter notebook or code file for further usage?
@BreuerTimo
@BreuerTimo Ай бұрын
Thanks for that one
@BboyGraphicx
@BboyGraphicx 26 күн бұрын
Thank you so much
@johnpeelslovechild
@johnpeelslovechild 10 күн бұрын
5:00 There is a mistake. The range function will generate a range from zero.
@Dr_Adar
@Dr_Adar 3 ай бұрын
Helped me a lot! thanks!
@htcsaj7876
@htcsaj7876 3 ай бұрын
Any advices or tutorial how to create python SaaS project
@rassy7
@rassy7 4 ай бұрын
Tim Overflow is sooooo much easier to understand than Stack Overflow.
@AllPraiseToYah
@AllPraiseToYah 3 ай бұрын
😂😂😂
@Chiramisudo
@Chiramisudo 3 ай бұрын
So is Claude AI. I still prefer the human element though, and always will, but when you want a quick discrete answer, AIs are great at summarizing results from many websites. I actually found Leo (Brave's AI built into their search engine) to be excellent at this.
@Nicolas_Turpin
@Nicolas_Turpin Ай бұрын
What about the "dir" function ? my favorite one :O
@martinkuliza
@martinkuliza 2 ай бұрын
Re SUM why would you do this and type 2 lines of code.... numbers = (1, 4, 5, 23, 2) print(sum(numbers)) when you can do this and have 1 line of code print (1 + 4 + 5 + 23 + 2) and get the same result ?
@SmokingNoir
@SmokingNoir 2 ай бұрын
When I was working at NASA I used these all the time when working on the Space Shuttle Challenger
@andreyv116
@andreyv116 Ай бұрын
In which contexts are map and filter *not* deprecated versus their comprehension counterparts?
@DavidParathyras
@DavidParathyras 4 ай бұрын
Master has been pleased 😁
@bryce1361
@bryce1361 Ай бұрын
Print also as the ever helpful .format() and f strings
@KJHounchou
@KJHounchou 3 ай бұрын
Is your freecodecamp machine learning with python course still useful for beginners? if you have a better course, could you tell me? I'm trying to get into an apprenticeship of software engineering and I'm not sure if it's the right decision to spend time on a 4 years old course. Thank you.
@StrandgaardMorten
@StrandgaardMorten 2 ай бұрын
Men der findes mere hensigtsmæssige og plausible metoder. Men tak for den detaljerede lektion, kolleger
@hadisardari1564
@hadisardari1564 3 ай бұрын
Dear Team, Thank you for your awesome content. I would like to request that you speak a little slower, if possible. For those of us whose native language is not English, your speaking speed can sometimes be a bit fast and unclear, causing us to miss some parts of the content.
@samuelvanhoolandt9725
@samuelvanhoolandt9725 3 ай бұрын
Thank you !
@videofountain
@videofountain Ай бұрын
At time 04:57 the speaker says the range starts at [one]. Is that correct?
@ninjapirate123
@ninjapirate123 2 ай бұрын
Well all of this was simple to understand
@101Mant
@101Mant 3 ай бұрын
I guess you need to know map and filter so you can replace them with comprehensions which you should be using instead.
@dimox115x9
@dimox115x9 3 ай бұрын
Plz i need your need in one of ur videos to build IA Agent advanced python using RAG : I did pip install llama-index-experimental so many times and also the upgrade version. I did ' from llama_index.experimental.query_engine import PandasQueryEngine ' and it says ' no module name llama_index.experimental '. Weird plz anyone?
@CultureofSpeech
@CultureofSpeech 4 ай бұрын
Salute 🙌 Bravo 👏👏 Lit 🌠 Impressive 👌❤ gratitude ✨ for your satisfactory Work 💪🚀🌱
@kowshikk.6559
@kowshikk.6559 Ай бұрын
Why do they used curly braces while sum function
@markramsell454
@markramsell454 3 ай бұрын
Python does many things for you that I used to do explicitly.
@afraazahmedusmani
@afraazahmedusmani 2 ай бұрын
I used the help function to create a python bot (not released)
@RiteKoder
@RiteKoder Ай бұрын
python is so cool
@Fr74n
@Fr74n 4 ай бұрын
Your content is gold
@AS-rg9ly
@AS-rg9ly 4 ай бұрын
Wait, are these functions or methods?
@johnbennett1465
@johnbennett1465 4 ай бұрын
Some are types. Some are functions. Some are functions that turn around and call a method on a parameter.
@maloukemallouke9735
@maloukemallouke9735 Ай бұрын
I like your videos ,
@tonytranguyennnn
@tonytranguyennnn Ай бұрын
I love that
@PixelMotionHD
@PixelMotionHD 4 ай бұрын
Can "with" statement be used with modules for database operations as well?
@ChopLancer
@ChopLancer 3 ай бұрын
I've tried that with psycopg and didn't work the same. Other packages might be different but just follow their documentation
@neckbro
@neckbro 3 ай бұрын
Never liked the "with" thing for files, even the Python professor in college said to not use it, same for list comprehension. Why make something easy one step more complicated for the mind to translate? If its cleaner on my mind , I don't care how it looks on an editor
@TechWithTim
@TechWithTim 3 ай бұрын
It has nothing to do with “looking good” it’s about utilizing the context manager for safety when operating with a file. It has a real utility in that it catches and resolves and file reading/writing errors automatically for you and ensures the file is closed correctly regardless of what you do. That’s why you use it.
@ChopLancer
@ChopLancer 3 ай бұрын
I have had issues copying files from an FTP server from not using with. Using with prevented me from having anymore blank files. I probably wasn't closing them properly but never need to worry about that using with
@darshankokal4670
@darshankokal4670 2 ай бұрын
It was good but I use all the hacks that you mentioned everyday
@Superstar-nl5tl
@Superstar-nl5tl 2 ай бұрын
Why are all the python tutorials explained lightning fast as if I am already a pro and know what it is talking about?
@zackzintho48
@zackzintho48 2 ай бұрын
Maybe they're made for people already familiar with these things but don't know exactly how they work. This one is clearly not for absolute beginners who don't know what a function is. There are many more tutorials that assume you're an absolute beginner. Example is Harvard's CS50 Python tutorial...
@anuragtewary5314
@anuragtewary5314 2 ай бұрын
This one is a good refresher of all the commonly used functions in python. I recommend watching this video after having atleast 6 months of experience in python. If you have written any python code for a project or LeetCode, then you will definitely have encountered and used these functions.
@Xboxman234
@Xboxman234 2 ай бұрын
Why don’t you give some examples about things that he mentioned that he assumes you should already know? everything in here seemed fairly low level. Maybe if you provided some examples that I could tell you how you’re wrong
@tatert0tz123
@tatert0tz123 2 ай бұрын
probably because you think you are a superstar already when you are just a star.
@Superstar-nl5tl
@Superstar-nl5tl 2 ай бұрын
@tatert0tz123 haha maybe 🤔
@zyphtron
@zyphtron 3 ай бұрын
Tuple = "Toople", not "Taple"!
@nargileh1
@nargileh1 2 ай бұрын
Trying to think of realistic uses cases for 'map' that you can't do with comprehensions ...
@Wopara
@Wopara 2 ай бұрын
I guess map just looks cleaner
@joekulik999
@joekulik999 Ай бұрын
Dear Tim: You're even better at teaching than you are in Python. How you organized these simple functions in one video answered a lot of questions for me, particularly because of the order in which you explained them. You could be successful in teaching any subject, Tim. Perhaps you should think about that before you fully invest your young life into computer programming. ❤
@sharathkumark9692
@sharathkumark9692 Ай бұрын
Damn! 😂 was that a roast?
@Choco794
@Choco794 4 ай бұрын
Anyone notice how he said maletrap instead of mailtrap.
@JirayuVijjakajohn
@JirayuVijjakajohn 4 ай бұрын
how could you notice the difference in pronunciation between 'male' and 'mail
@Choco794
@Choco794 4 ай бұрын
Oops I meant he wrote male trap instead of mailtrapsince there's no difference in the pronunciation between the two.
@mahdihasan42
@mahdihasan42 3 ай бұрын
python is getting semmiler like react js.... :)
@lapislazuli1949
@lapislazuli1949 3 ай бұрын
are you 23 years old?
@emmang2010
@emmang2010 3 ай бұрын
Guys just come across these during development. No need to watch formal videos on these really ever.
@ChopLancer
@ChopLancer 3 ай бұрын
I disagree, he showed there are ways around using these, if you don't know it's there, how else can you learn it's there unless someone shows you
@TechCodeGate213
@TechCodeGate213 3 ай бұрын
@JohannVF
@JohannVF 3 ай бұрын
I can never see "rng" as anything other than random number generator....
@shaduhhh
@shaduhhh 3 ай бұрын
First here 👇👇
@danial9705
@danial9705 4 ай бұрын
First !
@2Xb73OdF5
@2Xb73OdF5 3 ай бұрын
You lost me at mailplop
@TheFollower1
@TheFollower1 2 ай бұрын
LoL
@xmelsky
@xmelsky 3 ай бұрын
Waste of my time
@ArhamShahid-fc5cq
@ArhamShahid-fc5cq Ай бұрын
Make your video also in Hindi Please So you have more views!
@JebadiaSmith
@JebadiaSmith 3 ай бұрын
No thanks... Working on a computer for a living seems like it is going to become completely obsolete in less than 5 years. Why spend time learning useless things... Does anyone use cursive writing any more? It used to be the optimised form of communication.. But I would argue that every second I was taught how to cursive write was a waste of time and energy that could have been spent on more useful fundamental skills.. Now learning AGI Command prompts.. That seems to be where the future is headed.. My first computer was a MS Dos. Using functions like this used to be how it was done. But certainly not for much longer..
@101Mant
@101Mant 3 ай бұрын
As a coder who has used several AI code tools I have absolutely no fear for my job given the quality of the code they produce. Nor are they likely to get notably better in the future as throwing more training data at them leads to diminishing returns. Even if you can get it to produce the right code, you need to understand what it has produced to know it's right. AI has potential to be a useful aid but it's massively over hyped right now so all the startups can get that sweet VC cash.
@raghunathansundaresan8017
@raghunathansundaresan8017 3 ай бұрын
I've always been using key argument in sorted function by trial and error. Finally I understood. Thanks Tim great video as usual!
10 Python Functions That Will Simplify Your Life
19:19
Tech With Tim
Рет қаралды 55 М.
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 893 М.
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 8 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,8 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 20 МЛН
Top Python One Liners | Must Know
8:11
Coding News Today
Рет қаралды 147
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,2 МЛН
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 311 М.
PLEASE Learn These 10 Advanced Python Features
42:28
Tech With Tim
Рет қаралды 36 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
5 Good Python Habits
17:35
Indently
Рет қаралды 549 М.
All 39 Python Keywords Explained
34:08
Indently
Рет қаралды 185 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 424 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 8 МЛН