50 Python Tips and Tricks for Beginners

  Рет қаралды 68,270

Caleb Curry

Caleb Curry

Күн бұрын

Пікірлер: 78
@codebreakthrough
@codebreakthrough 4 жыл бұрын
Notes - calcur.tech/notes-python-tips-tricks Timestamps: 00:00 - Introduction 00:41 - Assign Multiple Variables on One Line 00:59 - Print Colored Text 01:38 - Power operator 01:55 - Banker’s Rounding 02:36 - Underscores in numbers 02:56 - Open a web browser 03:10 - Concat without + 03:28 - Split string on multiple lines 04:06 - Multiline string 04:25 - Multiline comment 04:37 - Get last element of list 05:05 - Reverse list with slicing 05:32 - Reverse with method 05:50 - Substring with in 06:25 - single line if 06:44 - get index with find 07:23 - id to get identity 07:48 - Aliases 08:51 - Primitive types are immutable 09:21 - in-place methods 10:10 - Replace list vs replace list content 12:33 - Copy list with slicing 12:57 - Copy a list with method 13:03 - Using deepcopy 14:44 - concatenate lists 14:59 - not data vs is none 15:32 - Check empty list 16:29 - Check if exists 18:20 - Print end =" " to change ending 18:49 - Print multiple elements with commas 20:47 - String formatting for easy string making 21:56 - Return multiple values and assign to multiple variables 22:55 - Ternary conditional operator 24:11 - Else can be used with loop 26:58 - Use range to generate lists 28:09 - Unpack operator 29:10 - How to do nothing in Python with pass 30:03 - Remove list duplicates 30:51 - Using in instead of complex conditional - Check against list of values 32:04 - complex conditional - Evaluate against any condition 33:21 - complex conditional - Evaluate against all conditions 33:28 - Split from string to multiple variables 34:43 - Join data 35:11 - Removing certain elements from a list 36:35 - Iterate backwards with reversed 37:19 - No do-while loop in python 38:46 - Assigning a function to a variable - just don’t use () 39:53 - Wait with time.sleep 40:38 - Get index with for loop 41:23 - Flatten a list with nested list comprehension
@0LoneTech
@0LoneTech Жыл бұрын
Is this top link the one you said in the introduction would be in the description? Because that has 15 other links but none that resemble the description... Also, this one leads to some sort of data collection form, not the notes.
@skydude7682
@skydude7682 3 жыл бұрын
"Just to make things realistic" earned my subscription. I'm beginning to learn python to bolster my IT skills and you seem like a cool guy to learn from
@emiliofedez4960
@emiliofedez4960 3 жыл бұрын
22:55 - Ternary conditional operator 24:11 - Else can be used with loop 07:48 - Aliases 28:09 - Unpack operator 30:03 - Remove list duplicates 40:38 - Get index with for loop 41:23 - Flatten a list with nested list comprehension
@algiffaryriony
@algiffaryriony 2 жыл бұрын
I'm not a beginner in Python, yet I really appreciate that you summarized the most important tips and still give a concise explanation and context for each of them. Great video, I wish this video exists when I was starting out learning Python.
@mad1337nes
@mad1337nes 2 жыл бұрын
Caleb is actually the GOAT at teaching, never been disappointed a single second of his videos.
@MichaelDude12345
@MichaelDude12345 3 жыл бұрын
I am still new to programming and have come from learning java for about 6 months; python has had me so freaking confused while trying to do some coding problems with lists. Because I didn't realize (07:48) that when I was assigning a new list to be equal to an old list, and then appending new values to the new list, it was also modifying my original list. This left me with so many issues trying to iterate through a for loop and generally do some basic stuff with these two lists (my math was thrown off since the two lists were exactly the same length and I didn't realize why that was). I thought I was going kinda crazy to be honest, because I have not had formal training with Python and am only about a week into learning the language. Thank you for this video, it really helped me understand one of the fundamental differences between Python and Java that I couldn't wrap my head around originally.
@TheTraveler33
@TheTraveler33 3 жыл бұрын
WOW! I was 1 min 15 seconds into this video before I declared it SO good that I just downloaded a copy. This will save A LOT of time compared to how the vast majority of people on youtube teaching python are saying to do it. I rarely subscribe to channels. Only about 7 right now. This channel just became number 8 and the first one concerning coding! I am blown away.
@bapbap6682
@bapbap6682 4 жыл бұрын
So we’re all just gonna ignore the 1:30 “Hoo I’m hungry” thing?
@abubalo
@abubalo 3 жыл бұрын
He just need to some syntax and he'd we be fine.
@attackeight
@attackeight Жыл бұрын
The -1 index for lists is so helpful! Makes my life simpler. Thanks for the awesome video!
@FlamencoDeniz
@FlamencoDeniz 4 жыл бұрын
30:42 I don't quite get the difference between the two outputs, where the second one supposed to be ordered? I understand set removes tje duplicates but I don't see how adding list to the statement changes the output
@dontbetoxic4387
@dontbetoxic4387 3 жыл бұрын
He converts it from a set to a list
@CodyHoskin
@CodyHoskin 2 жыл бұрын
This is amazing! You are a great teacher man.
@Alessandroale74
@Alessandroale74 4 жыл бұрын
I guess you will publish soon the remaining 51-100 tips too, right ? Thanks.
@sebastus27
@sebastus27 4 жыл бұрын
what do you recommend for me to develop my logic in writing code, for example if I have to arrange an increasing array or solve a problem that the Hanoi towers are difficult for me. Please Caleb give me some advice on where to start. Thank you!
@frambuella
@frambuella 2 жыл бұрын
Yo man, this was a great video for those of us just starting to learn python! So many tips that are genuinely useful!
@ninavanleeuwen1183
@ninavanleeuwen1183 8 ай бұрын
thank you. I really enjoyed the speed at which you explain and your examples are very clear!
@ttrev007
@ttrev007 10 ай бұрын
the bankers rounding of round() is really good to know. i didn't even know their were different standards for rounding.
@primusnocturn
@primusnocturn Жыл бұрын
Nice. Some of them obvious some really useful
@elnetini
@elnetini Жыл бұрын
I'm so glad I came across this early in my Python journey. Thabk you!
@PouriyaJamshidi
@PouriyaJamshidi 4 жыл бұрын
Awesome Stuff! Thank you Could you do a tutorial on decorators and properties?
@perinoveriza1658
@perinoveriza1658 4 жыл бұрын
Brother Caleb is the best teacher 👍
@someonesomewhere2966
@someonesomewhere2966 4 жыл бұрын
Hello Caleb , love ur vids 🙌 I just wanna ask u smth , I've finished with the basics of Python and I'm currently solving some examples but idk wut to do next..any advice ?
@someonesomewhere2966
@someonesomewhere2966 4 жыл бұрын
@@uhmmm2110 Thank you 🙌 will do
@xurshidkarimov9815
@xurshidkarimov9815 2 жыл бұрын
last trick: a = [[1,2,3], [4,5,6], [7,8,9]] a = sum(a, [ ]) print(a)
@durgeshkshirsagar116
@durgeshkshirsagar116 Жыл бұрын
What's the font you have used in editor?
@the-white-fang
@the-white-fang 4 жыл бұрын
It would have been really helpful if it included a little more advanced stuff like maps, decorators, class-factory etc.
@codebreakthrough
@codebreakthrough 4 жыл бұрын
I’m considering a part two. The original goal was 100 tips and tricks but I ran out of time :)
@the-white-fang
@the-white-fang 4 жыл бұрын
@@codebreakthrough great I'm looking forward to it. :)
@JurajBatoska
@JurajBatoska 2 жыл бұрын
Perfect ! Thanks a lot !
@pgallovich
@pgallovich 4 жыл бұрын
Love all your tutorials! Thanks so much! I can't wait to get started in the Python Bootcamp.
@Tony0Green
@Tony0Green 3 жыл бұрын
Ohh I'm hungry 😂 Love the video, thank you for the tips!
@mixme8655
@mixme8655 3 ай бұрын
Thank you sir I am a beginner in python😊
@ramkumarkumar9305
@ramkumarkumar9305 3 жыл бұрын
Can you guide me to create tool in phyton. It would be helpful for me. I am a beginner for phyton but i need to create a tool in 10 days i am willing to learn quick with clarity
@LeHalazoone
@LeHalazoone Жыл бұрын
Please can you let me know if data scientist and ML jobs will desapear with the nocode low programing and with ai tools ? Thanks in advance
@ChrisCox-wv7oo
@ChrisCox-wv7oo 10 ай бұрын
No, they won't.
@LeHalazoone
@LeHalazoone 10 ай бұрын
@@ChrisCox-wv7oo thanks for answering
@michalwojdat9763
@michalwojdat9763 Жыл бұрын
What theme is that ?
@tillischcious
@tillischcious Жыл бұрын
"Ohhh... I'm hungry!" :D 1:29
@marcelobenitezabc
@marcelobenitezabc 5 ай бұрын
muy util!!! muchas gracias!
@neurodivertida
@neurodivertida 10 ай бұрын
the “realistic” part 🥲🤌🏻🤣
@bosnianphantom480
@bosnianphantom480 2 жыл бұрын
17:50 I got True True
@Biokompott
@Biokompott 2 ай бұрын
Very helpful
@avjjbg23725
@avjjbg23725 3 жыл бұрын
i watch all of your videos, have you ever thought about getting a silent mouse/keyboard?
@duyd8086
@duyd8086 2 жыл бұрын
how did you get nice color fonts?
@ChrisCox-wv7oo
@ChrisCox-wv7oo 10 ай бұрын
Syntax highlighting
@oooo0O0oooo
@oooo0O0oooo Жыл бұрын
Thanks
@KowboyUSA
@KowboyUSA 4 жыл бұрын
C++ on the back burner. Python back to the front.
@fentonmsu
@fentonmsu 4 жыл бұрын
Amazing
@Mersipher
@Mersipher 3 жыл бұрын
Who would down vote this? What a dill hole. Caleb didn't have to share any of this. But he did. Be appreciative that he's took these tips from his experience working with python.
@kaleabwoldemariam4288
@kaleabwoldemariam4288 3 жыл бұрын
May be he didn't like the way he spoke humorlessly. Good tips.
@Bigblackninja5
@Bigblackninja5 3 жыл бұрын
Some people accidentally press it also
@nano7586
@nano7586 2 жыл бұрын
1:28 wat
@rafaelhenriquez2884
@rafaelhenriquez2884 7 ай бұрын
3:16
@thecscontent5110
@thecscontent5110 4 жыл бұрын
I also do videos about programming!😁
@JunaidShahJunaid-t4o
@JunaidShahJunaid-t4o 3 ай бұрын
Please share the notebook
@jamiegreig9699
@jamiegreig9699 2 жыл бұрын
Of course it's called banker's rounding lol
@SaveCount-bh8tp
@SaveCount-bh8tp 11 ай бұрын
Thanks but somme Times i think u should let us download the video
@minnuzamir5458
@minnuzamir5458 3 жыл бұрын
great
@yk4993
@yk4993 3 жыл бұрын
5**5 isn't a trick! Beside that, a very nice video
@serg3y
@serg3y 3 жыл бұрын
Python is a bit wierd.
@allanhenriques2694
@allanhenriques2694 4 жыл бұрын
actually assignment on the same line doesn't work the same way such as if you did: a=b b=a vs a,b=b,a two different results
@rancoxu
@rancoxu 2 жыл бұрын
That was really awkward!
@estelisarva3854
@estelisarva3854 2 жыл бұрын
Thank you, I love you, but I am a cat person :)
@rohitkumarbehera3523
@rohitkumarbehera3523 Жыл бұрын
Commenting this so that when someone likes this comment i will be back here to revise this.
@loveanimals-0197
@loveanimals-0197 4 жыл бұрын
How come you're doing a bootcamp on Python but don't even know the right way to pronounce Python? It's not named after the snake, but the British comedy group Monty Python. Learn that first.
@codebreakthrough
@codebreakthrough 4 жыл бұрын
? I know this lol
@codebreakthrough
@codebreakthrough 4 жыл бұрын
It’s actually the first thing I say in the bootcamp. So not sure how you’re getting this impression.
@loveanimals-0197
@loveanimals-0197 4 жыл бұрын
@@codebreakthrough Why are you mispronouncing it then?
@codebreakthrough
@codebreakthrough 4 жыл бұрын
I’ve never heard it pronounced any other way than how I’ve said it. There must be many ways to pronounce it and I don’t believe it’s worth fighting over :)
@geekyprogrammer4831
@geekyprogrammer4831 4 жыл бұрын
@Love Animals-01 I am a big criticizer on social media but this guy - Caleb Curry is 100% genuine! I found his teachings way more effective and fun compared to the courses on eDX and Coursera. Instead of picking his flaws, you should be more thankful he is giving us 100+ hours of content for free! Bootcamp is one of the ways we can show how thankful we are to him and also on the other hand gain knowledge and skills from it that will allow us to gain edge in the software development world!
10 Nooby Mistakes Devs Often Make In Python
24:31
Indently
Рет қаралды 70 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 254 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Python dataclasses will save you HOURS, also featuring attrs
8:50
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 433 М.
Programming Is NOT Enough | Add these 7 skills…
13:19
Travis Media
Рет қаралды 423 М.
11 Tips And Tricks To Write Better Python Code
11:00
Patrick Loeber
Рет қаралды 624 М.
10 Python Shortcuts You Need To Know
27:27
Tech With Tim
Рет қаралды 297 М.
The Fastest Way to Loop in Python - An Unfortunate Truth
8:06
mCoding
Рет қаралды 1,4 МЛН
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 167 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
10 Python Tips and Tricks For Writing Better Code
39:21
Corey Schafer
Рет қаралды 1,3 МЛН
10 ULTIMATE Python Tips 🔥
16:42
Tech With Tim
Рет қаралды 73 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН