10 ULTIMATE Python Tips 🔥

  Рет қаралды 70,796

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 89
@TechWithTim
@TechWithTim Жыл бұрын
To learn programming and Python - check out Datacamp! 💻 Learn Python - datacamp.pxf.io/KjaLY7 💻 Learn Programming - datacamp.pxf.io/QyZrxa
@kingofcastlechaos
@kingofcastlechaos Жыл бұрын
while True: watch Tech_with_Tim practice, practice, practice! print('Thank you Tim!!')
@Vancha112
@Vancha112 Жыл бұрын
​@@kingofcastlechaoswhy do you never thank him 😭
@kingofcastlechaos
@kingofcastlechaos Жыл бұрын
@@Vancha112 to be honest I had to pee and rushed the code. Now it's just funny. Thank you for the peer review!
@Vancha112
@Vancha112 Жыл бұрын
@@kingofcastlechaos 😂
@lagenet8911
@lagenet8911 Жыл бұрын
My KZbin ,@lagenet8911🎉My KZbin ,@lagenet8911🎉
@Vancha112
@Vancha112 Жыл бұрын
My best python tip would be, that if you want, you can add types to python. Adding return types to functions greatly increases the readability of code without having to read the last lines of a function. It also helps to know what arguments a function expects, instead of just telling you it's name.
@fedorezeev9923
@fedorezeev9923 Жыл бұрын
You can do exactly this. PEP 484 introduced type hints in Python 3.5
@Vancha112
@Vancha112 Жыл бұрын
@@fedorezeev9923 that's what I'm saying, thanks for mentioning the PEP number :)
@faustipez
@faustipez Жыл бұрын
I've learned a ton of python thanks to you. Hope you keep making these tips and project videos, more backend and web development with python would be awesome!
@jonpotts3375
@jonpotts3375 Жыл бұрын
you have inspired me over the last few weeks to start learning how to code! My one project that pulls info from YT and shows me the most viewed videos, likes, etc on one subject using an API, i typed in, learn Python and so many of your videos were up top ! Please keeping making these videos my guy! much love
@abithadani9860
@abithadani9860 Жыл бұрын
U r The best tutor for me so far. Ur teaching style are very clear
@rishiraj2548
@rishiraj2548 Жыл бұрын
👍🙏
@LynxesYT
@LynxesYT Жыл бұрын
Also guys if you want items at specific position of a list, you can use: Say x = [1,2,3,4,5] print(x[0::2]) the '::' operator starts from the initial integer and gets item with distance of second integer until the end. Output: [1,3,5]
@Arkssa
@Arkssa Жыл бұрын
start:stop:step
@aleksandrS3894
@aleksandrS3894 2 ай бұрын
The example with swap operation is very illustrative not as the mathematic action, but just to show you that you comfortably can work with tuples, rather than each variable separately. It's very useful when values are related. For example: def increase(range, ratio): bottom, top = range return bottom * ratio, top * ratio bottom, top =(10, 20) ... bottom, top = increase((bottom, top), 0.50, 0.50) # increase both by 50%
@ivan-youtube
@ivan-youtube Жыл бұрын
Great video! There is also a zip_longest function in itertools module which goes through as many items as the longest iterable has
@DRACULACollection
@DRACULACollection 9 ай бұрын
bro isn't a human 😮😮❤❤
@Chuen666
@Chuen666 10 ай бұрын
another tips just like the last one in this video: # normal a=[] for i in range(1,101): if i%2==0: a.append(i) # equal a=[i for i in range(1,101) if i%2==0]
@TvD1985
@TvD1985 Жыл бұрын
Regarding the get() example, do you prefer this over defaultdict? from collections import defaultdict words = ... word_counts = defaultdict(lambda: 0) for word in words: word_counts[word] += 1
@Wintermute4
@Wintermute4 Жыл бұрын
Counter() from collections is my go-to for this sort of thing
@TheMe9595
@TheMe9595 Жыл бұрын
Zip is so useful. I taught my friend about that the other day. I still don’t understand lambda though and I have always felt like it’s difficult to read when lambda is used.
@jonathanedwardgoode
@jonathanedwardgoode Жыл бұрын
Great tips as always! Just did a Javascript based full stack boot camp, but I had dabbled in Python and some of these concepts I now in Javascript but was curious about in Python. The biggest one was ternary operators.
@Sinke_100
@Sinke_100 Жыл бұрын
After two years of python and knowing most of things mentioned I still apriciate a value of videos like this, I really liked callback lambda example
@coderstribe4775
@coderstribe4775 Жыл бұрын
Thanks for sharing. Lambda is one of my best python feature
@PhunkyBob
@PhunkyBob Жыл бұрын
I didn't knew about the `setdefault` function in dictionaries. I always use "defaultdict" when I need this kind of feature. Glad to know another way!
@kamyararshi6235
@kamyararshi6235 Жыл бұрын
Thanks for the interesting tips! I learned and refreshed my memory
@taylormccoy7492
@taylormccoy7492 Жыл бұрын
That was great! Thank you man. Been learning python for the last 6 months or so and didn't know about a good quarter of those things despite my best efforts XD
@Kumar.Freelancer
@Kumar.Freelancer Жыл бұрын
Thank you. I'm glad to know that I use all these tips in my python programs
@IT015
@IT015 Жыл бұрын
Hi, I wanted to ask if I should start doing projects or start doing exercises to improve?
@uajoku
@uajoku Жыл бұрын
Super handy tips. Thank you Tim!
@BenRogersWPG
@BenRogersWPG Жыл бұрын
Great video, Tim. I'm so glad I subscribed to this channel!
@TechWithTim
@TechWithTim Жыл бұрын
Awesome, thank you!
@DrDeuteron
@DrDeuteron Жыл бұрын
I like lambdas (3:30). The other options is key=operator.attrgetter('age')
@DrDeuteron
@DrDeuteron Жыл бұрын
@@rpitit shoulda just replied AttributeError: 'dict' object has no attribute 'age'
@BrannenTaylor
@BrannenTaylor Жыл бұрын
I like to use ternary statements to do conditional printing. Like Flag = True somewhere. Then later, print (whatever) if flag else “”.
@farid5347
@farid5347 Жыл бұрын
Tim, you are awesome! Thank you, mate!
@sethwilliams5352
@sethwilliams5352 Жыл бұрын
Also notable that the default second param of .get() is None, so no value error and a convenient truth check
@paulthomas1052
@paulthomas1052 Жыл бұрын
Great set of useful tips - Thanks Tim.
@kapibara2440
@kapibara2440 Жыл бұрын
Great material Tim, thank you :)
@uuzumakifox9
@uuzumakifox9 Жыл бұрын
Great vid man, thank you❤
@nether-mobiletopc4293
@nether-mobiletopc4293 Жыл бұрын
Please do more tensorflow python courses pls
@extremeking2674
@extremeking2674 Жыл бұрын
Could you make a video on the latest features in python 3.10?
@alimihakeem841
@alimihakeem841 Жыл бұрын
I always love to watch your videos due to the way you explain. I found it useful. Could please make a full stack app video using JavaScript and flask for backend
@seifelshlkany5032
@seifelshlkany5032 Жыл бұрын
Think it's gonna be interested and useful ❤
@dragonsage6909
@dragonsage6909 Жыл бұрын
These are gold, thx
@dragonsage6909
@dragonsage6909 Жыл бұрын
@TechWithTim_2 really!?
@abdelghafourfid8216
@abdelghafourfid8216 Жыл бұрын
Actually some considers the for/else while/else as a bad pattern. There is a full explanation from mCoding on this.
@Dubai_life_
@Dubai_life_ Жыл бұрын
Thank you.
@codingdidi-hindi
@codingdidi-hindi Жыл бұрын
Good to go with python language
@jonahsatheesh5346
@jonahsatheesh5346 Жыл бұрын
Make a video on "CodeWhisperer"!!!
@dolodestinations7628
@dolodestinations7628 Жыл бұрын
I watched your 7 hour free code camp on tensorflow but it didn’t quite have what I needed. Looking for a tutorial on deep learning where a sports score is predicted. Not win or loss. But an actual number. Can you point me in the right direction? Please and thank you.
@sinaorojlo5980
@sinaorojlo5980 Жыл бұрын
Awesome 🎉 Pleas make video about Enumerate
@Kay-qg1vn
@Kay-qg1vn Жыл бұрын
Hey Tim I hope you are. Can you give any tips on how you approached theory for retention in CS? I feel like whenever I am reading theory I read it passively. I am doing CS and Maths.
@peace-to-the-world
@peace-to-the-world Жыл бұрын
Try to explain, why is following not gonna work without defining initial value for "_": x = 1 data = [(1, 'one'), (2, 'two'), (3, 'three')] def print2(y): y = y + x print(f"the y = y+x is '{y}', and _ is '{_}'") if __name__ == '__main__': x = x + 1 - 1 for f, word in data: f = f + 1 - 1 _ = _ + x print("word is '", word, "' ") print2(f)
@sureshkhadka1020
@sureshkhadka1020 Жыл бұрын
Sir make a video of Django projects ✅🔥
@Dipenparmar12
@Dipenparmar12 7 ай бұрын
Amazing tutorials
@felixmuller9062
@felixmuller9062 Жыл бұрын
Which theme do you use in VSCode?
@GTV_367
@GTV_367 Жыл бұрын
🙌🙌thanks
@wolfpain5928
@wolfpain5928 Жыл бұрын
Great video 👍.
@TechWithTim
@TechWithTim Жыл бұрын
Glad you enjoyed it
@ramanproductions24
@ramanproductions24 2 ай бұрын
07:50 In line 9, at .get(word, 0), don't we have to enclose "word" in single or double quotes?
@gkett19
@gkett19 Жыл бұрын
defaultdict > get
@jimmyjammers28
@jimmyjammers28 Жыл бұрын
Neesh neesh😂😂😂😂😢😢😢😢😮😮😅😅😊😊🎉🎉😮😢😢😢😢😢😢😮😂
@keenzeen
@keenzeen Жыл бұрын
Great! 🎉
@TechWithTim
@TechWithTim Жыл бұрын
Thanks! 😃
@julianreichelt1719
@julianreichelt1719 Жыл бұрын
nice video!
@TechWithTim
@TechWithTim Жыл бұрын
Thanks!
@venkyman4985
@venkyman4985 Жыл бұрын
Quick doubt: in the ternary operators, what if i dont have an else? is it still possible to use that syntax?
@derekcarday
@derekcarday Жыл бұрын
Can you share a few more impractical things? I don't like practical
@shubhambhattacharjee1111
@shubhambhattacharjee1111 9 ай бұрын
Please don't use nested ternary, it's always prety hard to look at.
@zzzzzzzzzz1250
@zzzzzzzzzz1250 Жыл бұрын
Just recently following you and yesterday ended one of your tutorials. they are easy to follow and you explain everything so clearly. thanks for that!!! Could you share some experience or tips on how to reach for a first job in (or with) python when you are at the beggining of this track? I'm trying to change paths here and I feel unsure on how to get a first job here without real experience. Thank you
@genie9262
@genie9262 Жыл бұрын
@johnbett-bv6zi
@johnbett-bv6zi Жыл бұрын
still a beginner sorry to say this
@B00BS.
@B00BS. Жыл бұрын
hi Tim
@TechWithTim
@TechWithTim Жыл бұрын
Hello
@staywithola9724
@staywithola9724 Жыл бұрын
@@TechWithTim Tim, is a good guy!
@umangsahu7291
@umangsahu7291 Жыл бұрын
Please anyone tell me the editor he is using???
@subinkv6849
@subinkv6849 6 ай бұрын
Please simplify the explanation. Some of the concepts are not clear.
@mwils51
@mwils51 10 күн бұрын
Your code is flawed. I am 65 and my doctor just told me health = "Excellent" 😊
@ManjuSharma-b7l
@ManjuSharma-b7l Жыл бұрын
I wanted to say that if you see my msg, I have bought Programming expert course and it is utter waste. You are teaching as if its 10 year old learning programming. I took that course thinking it has shown around 251 problems to solve and I get frustrated seeing True or False question, this or that. Have some standard question You have add practice questions. Not 2nd grade questions. Very disappointed and not getting refund too.
@abdullahalharthi2576
@abdullahalharthi2576 Жыл бұрын
@TechWithTim can u do bygbag
@ManjuSharma-b7l
@ManjuSharma-b7l Жыл бұрын
I wanted to say that if you see my msg, I have bought Programming expert course and it is utter waste. You are teaching as if its 10 year old learning programming. I took that course thinking it has shown around 251 problems to solve and I get frustrated seeing True or False question, this or that. Have some standard question You have add practice questions. Not 2nd grade questions. Very disappointed and not getting refund too.
10 Python Shortcuts You Need To Know
27:27
Tech With Tim
Рет қаралды 296 М.
5 Wacky Python Features
15:37
Indently
Рет қаралды 28 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 316 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Python for Beginners  🐍 - Learn Strings in 20 minutes
21:24
PythonCodeCamp
Рет қаралды 251
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 158 М.
Avoid These BAD Practices in Python OOP
24:42
ArjanCodes
Рет қаралды 74 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 218 М.
10 Nooby Mistakes Devs Often Make In Python
24:31
Indently
Рет қаралды 67 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,2 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 630 М.
PLEASE Use These 5 Python Decorators
20:12
Tech With Tim
Рет қаралды 122 М.