Learn These 6 Interesting Features of Python Functions
In this video, I will be showing you the 6 HIDDEN features of Python functions that you should be aware about. Each of them get more and more interesting and advanced as we go through them so make sure you stick around until the end of the video to learn them all.
If you want to land a developer job check out my program with CourseCareers: techwithtim.net/dev
🎞 Video Resources 🎞
Decorators Video: • Expert Python Tutorial...
⏳ Timestamps ⏳
00:00 | Feature #1
02:57 | For Serious Developers
04:08 | Feature #2
09:07 | Feature #3
11:47 | Feature #4
15:35 | Feature #5
18:30 | Feature #6
Hashtags
#python #pythonprogramming #coding
Пікірлер: 42
so many ppl not understanding the difference between "advanced" - which is never claimed- and 'more advanced'. for that last one you need to understand to what they are comparing, in this case likely to a starting python dev. or starting from the skill level of a starting dev. it's like thinking "faster ways of transportation" should only list the "fastest ways of transporation", while biking is a legit answer/option if one is comparing to/starting from transportation by walking.
AGAIN very cool, interesting video. Thanks for your explanations.
I really enjoyed this video, but felt for some of the more abstract examples it would be great to see the real world problems that these approaches would solve, particularly 3 & 4. Love the videos keep it up.
Very good tutorial. thanks.
args and kwargs are something I keep forgeting about and every time I come across those, I get startled :D It's because of my style of programming - I always make sure I know what I'm doing at any time (because I'm scared of a scenario when I don't :)) so I'm very strick and verbose with what I'm passing and where :)
So if I understood this right the nonlocal keyword is basically the global keyword but looks for the variable 1 scope far instead of the global scope?
Great one Tim.. I found it helpful
thank you sir.. you're great 🎉❤ Love from your Pakistani student🇵🇰😊
thank you God bless
2:23 values=[] You call this array but it's not, mate. That's a list Also this is not recommended to put an empty list as the default value in the function, cuz it's mutable and will be the same for each function call.
@TechWithTim
20 күн бұрын
Yes I’m aware I often use them interchangeably as I’m used to coding in JS daily but I appreciate the specific correction.
"As you can see it says 15". (actually says 7 11)
What is the best language program for website scarping tim?
Hey Tim, can you show us how to use OCR to extract text from uploaded images and pdfs (like user ids) and return the data so the user can use it? Is it possible to feed some images/pdf patterns (like specific country ID, for example) so the OCR can get even more precise? Thanks, bro!
@herbertpurpora9452
26 күн бұрын
If you need it urgent. U should check tesseract-ocr, its an ocr engine. Their documentation is solid and theres a lot of videos here explaining how to use it. You can also train your own data on it.
@sportsuk6769
26 күн бұрын
import pytesseract from pdf2image import convert_from_path from PIL import Image import os # Configure the path to the Tesseract executable pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract' # Update this path as per your Tesseract installation def ocr_from_image(image_path): # Open an image file with Image.open(image_path) as img: # Use pytesseract to do OCR on the image text = pytesseract.image_to_string(img) return text def ocr_from_pdf(pdf_path): # Convert PDF to a list of images pages = convert_from_path(pdf_path) text = '' for page_number, page in enumerate(pages): # Use pytesseract to do OCR on each page image page_text = pytesseract.image_to_string(page) text += f'--- Page {page_number + 1} --- {page_text} ' return text # Detect the file type and perform OCR accordingly file_path = '/mnt/data/file-v6oYmeGhXPvbLDmDqioj6FUY' file_extension = os.path.splitext(file_path)[-1].lower() if file_extension == '.pdf': extracted_text = ocr_from_pdf(file_path) else: extracted_text = ocr_from_image(file_path) # Display the extracted text print(extracted_text)
Thanks
IN which field of programming are these features useful to apply? Data Analytics, ML, databases, network automation or something else?
All of these besides nonlocal are used in any reasonably sized Python shop. I’d consider them intermediate, but not necessarily advanced. I would say doing async Python with coroutines is advanced or context managers
Awesome
N8nlocal is kinda class. :)
Nice
Super
can you make a Data Structure and Algorithms crash course thanks bro🤓
what vscode theam
hi tim how is it going in UAE
As a beginner programmer, I found it very hard to grasp the concept of "closures" with this kind of arithmetic examples, I think the usefulness of closures is better understood with practical examples as in Javascript fetching "BaseURL + URL"
Hi
It takes patience, you'll see it
Didn't talk about argument unpacking func(**{'a':1, 'b':2} or forcing value passing by name only def func(*, a, b) smh Besides knowing how to use Vim, sending code like that is the best way to pickup compsci women
Early gang
First view
I see nothing advanced 😒
@effortndewere
26 күн бұрын
😂😂😂😂 take y'all time
@mednmovies6959
26 күн бұрын
Well your advanced 🙌
@arsenmkrtchyan4832
26 күн бұрын
Most likely you are too smart
@davidbenson8127
25 күн бұрын
Neither did Sgt. Schulz...
@Ohiostategenerationx
24 күн бұрын
It says interesting.
Sorry sir, but if I am clicking on this vid. (not to waste time) then I am an Intmd. dev atleast, and these features are expected from me.
@mrgee9430
26 күн бұрын
An intermediate dev from a professional perspective is a whole lot different than an intermediate student or junior dev. It's all about perspective. I'd argue this is an accurate title, based on the latters' perspective to grow into higher tier positions.