50 Python Tips and Tricks for Beginners

  Рет қаралды 63,705

Caleb Curry

Caleb Curry

Күн бұрын

Start your software dev career - calcur.tech/dev-fundamentals 💯 FREE Courses (100+ hours) - calcur.tech/all-in-ones
🐍 Python Course - calcur.tech/python-courses
✅ Data Structures & Algorithms - calcur.tech/dsa-youtube
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
✉️ Newsletter - calcur.tech/newsletter
📸 Instagram - / calebcurry
🐦 Twitter - / calebcurry
🔗 LinkedIn - / calebcurry
▶️ Subscribe - calcur.tech/subscribe
👨🏻‍🎓 Courses - www.codebreakthrough.com
~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
↪ My Amazon Store - www.amazon.com/shop/calebcurry
🅿 Patreon - calcur.tech/patreon-calebcurry
🅖 GitHub Sponsors - github.com/sponsors/CalebCurry
Ⓟ Paypal - paypal.me/calcur
🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
📈 Buy Bitcoin - calcur.tech/crypto
Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code "Caleb") - calcur.tech/crypto

Пікірлер: 73
@codebreakthrough
@codebreakthrough 3 жыл бұрын
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 8 ай бұрын
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 2 жыл бұрын
"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
@bapbap6682
@bapbap6682 3 жыл бұрын
So we’re all just gonna ignore the 1:30 “Hoo I’m hungry” thing?
@abubalo
@abubalo 2 жыл бұрын
He just need to some syntax and he'd we be fine.
@mad1337nes
@mad1337nes Жыл бұрын
Caleb is actually the GOAT at teaching, never been disappointed a single second of his videos.
@algiffaryriony
@algiffaryriony Жыл бұрын
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.
@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
@ttrev007
@ttrev007 3 ай бұрын
the bankers rounding of round() is really good to know. i didn't even know their were different standards for rounding.
@attackeight
@attackeight 8 ай бұрын
The -1 index for lists is so helpful! Makes my life simpler. Thanks for the awesome video!
@ninavanleeuwen1183
@ninavanleeuwen1183 17 күн бұрын
thank you. I really enjoyed the speed at which you explain and your examples are very clear!
@CodyHoskin
@CodyHoskin 2 жыл бұрын
This is amazing! You are a great teacher man.
@TheTraveler33
@TheTraveler33 2 жыл бұрын
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.
@Alessandroale74
@Alessandroale74 3 жыл бұрын
I guess you will publish soon the remaining 51-100 tips too, right ? Thanks.
@MichaelDude12345
@MichaelDude12345 2 жыл бұрын
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.
@PouriyaJamshidi
@PouriyaJamshidi 3 жыл бұрын
Awesome Stuff! Thank you Could you do a tutorial on decorators and properties?
@elnetini
@elnetini 4 ай бұрын
I'm so glad I came across this early in my Python journey. Thabk you!
@frambuella
@frambuella Жыл бұрын
Yo man, this was a great video for those of us just starting to learn python! So many tips that are genuinely useful!
@pgallovich
@pgallovich 3 жыл бұрын
Love all your tutorials! Thanks so much! I can't wait to get started in the Python Bootcamp.
@JurajBatoska
@JurajBatoska Жыл бұрын
Perfect ! Thanks a lot !
@primusnocturn
@primusnocturn Жыл бұрын
Nice. Some of them obvious some really useful
@perinoveriza1658
@perinoveriza1658 3 жыл бұрын
Brother Caleb is the best teacher 👍
@Tony0Green
@Tony0Green 2 жыл бұрын
Ohh I'm hungry 😂 Love the video, thank you for the tips!
@xurshidkarimov9815
@xurshidkarimov9815 Жыл бұрын
last trick: a = [[1,2,3], [4,5,6], [7,8,9]] a = sum(a, [ ]) print(a)
@the-white-fang
@the-white-fang 3 жыл бұрын
It would have been really helpful if it included a little more advanced stuff like maps, decorators, class-factory etc.
@codebreakthrough
@codebreakthrough 3 жыл бұрын
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 3 жыл бұрын
@@codebreakthrough great I'm looking forward to it. :)
@someonesomewhere2966
@someonesomewhere2966 3 жыл бұрын
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 3 жыл бұрын
@@uhmmm2110 Thank you 🙌 will do
@neurodivertida
@neurodivertida 2 ай бұрын
the “realistic” part 🥲🤌🏻🤣
@fentonmsu
@fentonmsu 3 жыл бұрын
Amazing
@sebastus27
@sebastus27 3 жыл бұрын
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!
@janusztarnowski115
@janusztarnowski115 Жыл бұрын
what you think about it ?kzbin.info/www/bejne/rpXQmp2fo9eeY9k
@durgeshkshirsagar116
@durgeshkshirsagar116 Жыл бұрын
What's the font you have used in editor?
@FlamencoDeniz
@FlamencoDeniz 3 жыл бұрын
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
@tillischcious
@tillischcious Жыл бұрын
"Ohhh... I'm hungry!" :D 1:29
@oooo0O0oooo
@oooo0O0oooo Жыл бұрын
Thanks
@avjjbg23725
@avjjbg23725 2 жыл бұрын
i watch all of your videos, have you ever thought about getting a silent mouse/keyboard?
@minnuzamir5458
@minnuzamir5458 3 жыл бұрын
great
@ramkumarkumar9305
@ramkumarkumar9305 2 жыл бұрын
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
@michalwojdat9763
@michalwojdat9763 5 ай бұрын
What theme is that ?
@mehdib1781
@mehdib1781 7 ай бұрын
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 3 ай бұрын
No, they won't.
@mehdib1781
@mehdib1781 3 ай бұрын
@@ChrisCox-wv7oo thanks for answering
@bosnianphantom480
@bosnianphantom480 Жыл бұрын
17:50 I got True True
@duyd8086
@duyd8086 Жыл бұрын
how did you get nice color fonts?
@ChrisCox-wv7oo
@ChrisCox-wv7oo 3 ай бұрын
Syntax highlighting
@thecscontent5110
@thecscontent5110 3 жыл бұрын
I also do videos about programming!😁
@KowboyUSA
@KowboyUSA 3 жыл бұрын
C++ on the back burner. Python back to the front.
@SaveCount-bh8tp
@SaveCount-bh8tp 3 ай бұрын
Thanks but somme Times i think u should let us download the video
@nano7586
@nano7586 2 жыл бұрын
1:28 wat
@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.
@thenextbigthing7268
@thenextbigthing7268 2 жыл бұрын
Some people accidentally press it also
@yk4993
@yk4993 3 жыл бұрын
5**5 isn't a trick! Beside that, a very nice video
@jamiegreig9699
@jamiegreig9699 2 жыл бұрын
Of course it's called banker's rounding lol
@rancoxu
@rancoxu 2 жыл бұрын
That was really awkward!
@serg3y
@serg3y 2 жыл бұрын
Python is a bit wierd.
@allanhenriques2694
@allanhenriques2694 3 жыл бұрын
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
@estelisarva3854
@estelisarva3854 Жыл бұрын
Thank you, I love you, but I am a cat person :)
@rohitkumarbehera3523
@rohitkumarbehera3523 8 ай бұрын
Commenting this so that when someone likes this comment i will be back here to revise this.
@loveanimals-0197
@loveanimals-0197 3 жыл бұрын
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 3 жыл бұрын
? I know this lol
@codebreakthrough
@codebreakthrough 3 жыл бұрын
It’s actually the first thing I say in the bootcamp. So not sure how you’re getting this impression.
@loveanimals-0197
@loveanimals-0197 3 жыл бұрын
@@codebreakthrough Why are you mispronouncing it then?
@codebreakthrough
@codebreakthrough 3 жыл бұрын
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 3 жыл бұрын
@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 Python Tips and Tricks For Writing Better Code
39:21
Corey Schafer
Рет қаралды 1,3 МЛН
10 Python Shortcuts You Need To Know
27:27
Tech With Tim
Рет қаралды 290 М.
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 64 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 116 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 30 МЛН
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,2 МЛН
Python 101: Learn These 5 Must-Know HIDDEN Features
16:38
Tech With Tim
Рет қаралды 66 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 786 М.
Python As Fast as Possible - Learn Python in ~75 Minutes
1:19:41
Tech With Tim
Рет қаралды 1,7 МЛН
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 97 М.
Object Oriented Programming (OOP) In Python - Beginner Crash Course
1:20:54
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,7 МЛН
👩‍💻 Python for Beginners Tutorial
1:03:21
Kevin Stratvert
Рет қаралды 3 МЛН
10 ULTIMATE Python Tips 🔥
16:42
Tech With Tim
Рет қаралды 60 М.
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 1,4 МЛН
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 2,1 МЛН