I think you're much too harsh on bob at 9:45. bob has helped in so much of my coding. Always been there at the frontlines, takes any assignment I hand out, and successfully completes tasks, or faithfully reports errors encountered. Justice for bob!
@EpicNoobx8 ай бұрын
So true
@drforest8 ай бұрын
bob is _
@TidalMaker6 ай бұрын
Bob helped me with my flat tire. I was on my way to a coding interview. I wouldn't have gotten the job without him.
@Farfromfuture6 ай бұрын
I use Alex Smith in everything
@hunterbshindi23106 ай бұрын
Yeah, he just cured my ovarian cancer
@cyberhard8 ай бұрын
Excellent video. Thanks for sharing your knowledge!
@WinfriedKastner8 ай бұрын
Python in 34 minutes. Incredible!! And perfectly explained as always 👍
@miquelr23538 ай бұрын
I got lost at the asyncio part. The 7th keyword lol
@AJMansfield18 ай бұрын
4:07 you also use "as" with "except" to assign the exception to a variable
@tgsvampire7 ай бұрын
Is this kind of use of 'as' keyword relevant in the industry ?
@AJMansfield17 ай бұрын
@@tgsvampire except/as is perhaps even more common in real code than with/as
@godowskygodowsky11556 ай бұрын
@tgsvampire When you're working with large systems, logging errors is a must. You need the "as" keyword to pass exceptions to a logger.
@tongpoo89854 ай бұрын
@@tgsvampireyes, used all the time.
@verysb7 ай бұрын
Some complement: A and B -> (B if A else A) A or B -> (A if A else B) bool(0) -> False bool(“”)-> False bool([])-> False bool(None)-> False bool(“ “)-> True code after else that after while, for, try except will only be executed when the loop or the try is finish normally (not normal: break, error)
@Keventor6 ай бұрын
33:12 type type = int | float match: type = 10 case: type = 10.0 match match: case case: print(f"types {type} are the same because case {case} matches {match}")
@cuicuidev8 ай бұрын
You can also use the from keyword to yield from an iterator: yield from iterator
@marckiezeender8 ай бұрын
And you can use "from" to raise an exception from a context. I.e., raise Exception() from None
@anthonydrakefordshadow6 ай бұрын
Thank you I really am beginning to appreciate material that is more focused on thinking, and Python. I’ve learned a lot from tutorials, but for the most part, I am only able to apply what I have copied and limited situation versus having an understanding and being able to create.
@simonwillover41758 ай бұрын
Built-in constants: * `False` * `None` * `True` Built-in functions: * `assert` * assert is simply a built-in function that doesn't require parenthesis; you could write your own function, `my_assert`, that does the same thing * `type` * unlike `assert`, you can override `type` Imports: * `import` * `from` - must be followed by `import` * `as` - must be proceeded by `import` or `with` Declarations: * `class` * `def` * `async` - must be followed by `def` * `del` * Scope changes: * `global` * `nonlocal` Logical operators: * Unary: * `not` * Binary: * `and` * `in` * `is` * `or` * Ternary: * `if` and `else` - must be used together, like this: * `(when_true) if (condition) else (when_false)` Expression: * `lambda` * allows you to make a 1-line function that returns the value on the line without declaring the function * very Control: * `pass` * actually does nothing * typically used to put an empty body in a control block, function, or class * Logic * `if` * `else` * `elif` * Loops: * `for` * `while` * `continue` * `break` * Error handling: * `try` * `except` - must be proceeded by `try` * `finally` - must be proceeded by `try` or `except` * `raise` * Functions: * `return` * `yield` * makes the function return a generator, even if the code around `yield` is not accessible * this items in this generator are all of the values of each `yield` statement * if the function hits a `return` statement, the generator will stop / finish and ignore the rest of the function; further attempts to generate items from the generator will fail because it is finished and the GC might have deleted the function call stack that the generator used * Async: * `await` Switch statenements: * `case` * `match` Bad * `with` * `with A as B: C` does this: * run `A` * set `B =` return value of `A` * run `B.__enter__()` * try to run `C` * if an exception occurs, run `B.__exit__(self, exception_type, exception_val, trace)` Doesn't do anything and is not a constant * `_` * essentially not a keyword
@tgsvampire7 ай бұрын
Hey ? Are you a pro ?
@tgsvampire7 ай бұрын
What is this global and local scope ? ls it like, the local scope variable is something that can be directly accessed by only the function in which it is defined ?
@tgsvampire7 ай бұрын
This is one of the most underrated comment I bet...🧠🔥
@tgsvampire7 ай бұрын
What is this lamda ? I have seen this many times but I am confused about this one.
@simonwillover41757 ай бұрын
@@tgsvampire I am not really a pro. I am an enthusiastic programmer with only a few years of hobby experience. I could get a job as a junior dev if I wanted to though. I read your other comments and it looks like you want to learn python. I suggest you learn more python. My comment only makes sense to people without about a year of programming under their belt.
@Celemimphar8 ай бұрын
I have never heard of several of these despite taking a few Python courses... I am intrigued
@callbettersaul8 ай бұрын
"despite" is the wrong word here.
@stephenEs35327 ай бұрын
@@callbettersaul its not English class. Hush your mouth
@Icthi7 ай бұрын
Let’s suppose it’s English class for a sec. What do you suppose is wrong with this use of “despite”?
@TearsOfTheKingdomIsGreatToo2 ай бұрын
it is correct @@callbettersaul
@prof.anthonirajАй бұрын
Great way of explaination about Python Keywords. Keep it up.
@ImportCode6 ай бұрын
I'm I the only one finding this video funny. Very comprehensive video. I love it.😅
@rakibmasud32887 ай бұрын
Really appreciate your effort. More videos like this please!!!
@PCgmesforever6 ай бұрын
Why is it that all programming teachers I know are calmest most chill and nice people yet they casually drop the darkest type of humour or life truths :D
@jefflastofka9289Ай бұрын
That's a really great review to see which ones I know and which ones I should look into soon or ignore for a while longer. Thank you so much for putting all that together.
@avrelyyАй бұрын
great explanation of each keyword. Thanks!
@datanasov8 ай бұрын
At 33:33 you can't do that. Doing "case case:" will match any number (not just 10) and put it in the variable case. I think that's why your editor is underlining it.
@Indently8 ай бұрын
Well spotted, and noted! I clearly didn't do enough research on that because it was a "case" I thought I'd never even dare to attempt. I appreciate you pointing it out :)
@flaminggasolineinthedarkne47 ай бұрын
Really nice video with the explanations about built in keywords in python. I appriciate your efford.
@zayyabhone2 ай бұрын
this was very informational, thank you for the insight
@chriscarney22608 ай бұрын
27:25 great video. Point of house keeping.. there are 2 While keywords in the info list. 2nd should be With.. Still a great video;-)
@Indently8 ай бұрын
Thank you! I updated it :)
@ЮрийБ-о6е8 ай бұрын
Amazing video, thx. Waiting for combination of them :) Once, I was really confused by `yield from`
@yidisprei1008 ай бұрын
The 'in' keyword is in the thumbnail twice. Amazing content btw.
@Indently8 ай бұрын
Good eye! My friend spotted that a couple days ago while the video was private, and I was wondering how many other people would notice.
@alejandroherme94978 ай бұрын
Some useful details: ( Better to write this down before I forget something ) "and"/"or" : because of the short circuit system, these can return any object (non booleans). "None": while these represent the absence of a value (like null in other languages), it doesn't mean that every non declared name equals None. It's more of a special value that any object can take. (btw if we use types, by default it's incorrect to assign None). Also we must be careful when writing "assert x" or "if x:" when we want to check for None , because if x is equal to False, it will act as if it is None. This depends on the __bool__ method of the object in question. Asserts: I've read that they only work if __debug__ is True, so I'm instead using "if x: raise Exception". "del": a non recommended keyword. Its behavior depends on the object involved. If it's a list item, del will remove it from lists. "pass": avoid filling placeholders with pass, since you won't be able to differentiate what is supposed to do nothing (for example, an abstract method) and what has its implementation pending. I prefer to "raise NotImplementedError()"
@marckiezeender8 ай бұрын
Just to add about 'pass': I use pass to denote "this block of code does nothing", I use raise NotImplementedError to denote "this block is missing its implementation", and I use ... to denote "this block of code is abstract" (i.e. for a stub file, Protocol method, or abstract method; note that you can't create instances of abstract classes.)
@max_unch8 ай бұрын
Thank you for all the excelente work! Great video 👌🏼
@denoww92616 ай бұрын
Great video! Btw, at 33:33, technically `case case` doesn't work as you'd expect - the way case statements work, a single variable name after the keyword is actually assigning a variable to the value of the match statement (in this case, the `match` variable). So here you'd have a shadowed `case` variable inside your case block with whatever value was in the `match` variable.
@leftsidemartian98397 ай бұрын
can someone explain the variable declaration at 5:31 please 🙏
@owtechS7 ай бұрын
This variable declaration db: str | None = "myd.db" is using type hints, which are annotations used in Python to indicate the expected types of variables. Let me break it down for you: db: This is the name of the variable. :: This indicates that what follows is the type annotation for the variable. str | None: This part indicates that the variable db can hold either a string (str) or None. = "myd.db": This part initializes the variable db with the value "myd.db". Here, "myd.db" is a string, which satisfies the first part of the type hint (str).
@velo412velo7 ай бұрын
Amazing job buddy. Thank you very much for all your hard work! You are amazing and I am defo gonna buy one of your paid tutorials.
@Lolks8 ай бұрын
My first encounter of the None keyword, was on my Python Midterm, when we had to figure out the output of code snippets, and one of the questions was print(print("Hello, World!")
@elymX6 ай бұрын
Would be nice if you do the same thing for SQL so we can have 1 stop shop as reference.
@Radical95353 ай бұрын
Really good Video!
@lucasmandato49104 ай бұрын
dude this is amazing thank you so much
@Technology_AmaAkar19 күн бұрын
Thank you for sharing
@rainymatch7 ай бұрын
lovely vid, as for if/else, I would have been happy to see also the ternary expression 🙂 ``` if else ```
@xandii46948 ай бұрын
should have mentioned using only 'throw' in an 'except' block to rethrow and maybe how to use underscore for "private" methods. Apart from that great video 👍
@caymanm72413 ай бұрын
What do the "|"s do when declaring a variable? I'm assuming it's similar to type hints.
@TheImmortalKingCeaser7 ай бұрын
Awesome work.
@alansnyder84488 ай бұрын
Really good video. I've learned a few things. 'match' with a tuple was completely unknown to me before this video. I've seen '_' used, but now understand it. Can someone tell me when the '_' became a feature? If I use it in Python 3.8 will it cause a problem?
@Snollygoster-8 ай бұрын
I actually saw the nonlocal in a script at work, it functioned how I thought, but seeing it then just made me wonder why it's even there. It looked like they were just trying to add more lines of code.
@sovereignlivingsoul7 ай бұрын
very classy Class explanation, lol, fast forward ahead, when you read the text from the file, can you go to a specific line and input data,
@Johann753 ай бұрын
Cool lesson
@mixme86553 ай бұрын
Thank you sir❤
@watchmakerful7 ай бұрын
Wow, finally a language where a switch construction does not require "break" after each case!
@axiezimmah4 ай бұрын
That's a downside imo. Fallthrough isn't possible in python even if you wanted it to. Which limits the use cases.
@I3ased6 ай бұрын
9:15 im so confused to why he has none in all these are they doing something?
@olivergrim76346 ай бұрын
None there means what they return by default they return None (__init__ ALWAYS returns None) ex.: def myfunc() -> int: this *hints* that the function returns an integer returning works with the return keyword and replace the call of function in code with that the function returns returning is when we want information from the function
@I3ased6 ай бұрын
@@olivergrim7634 thank you for replying i understand now 🙏🙏
@ashutoshsinha98488 ай бұрын
Can you suggest good resource to learn asynchronous programming with python? or better make a detailed video.
@Jan_Be8 ай бұрын
Could you upload the examples as python files? Thank you!
@joshix8338 ай бұрын
What about the other uses of else? Like for ... else, while ... else, try ... except ... else?
@effanineffables8 ай бұрын
was looking for this comment before I said the same thing! else is so much more than just if..else
@abdomash_8 ай бұрын
32:36 Wow, TypeScri-... I mean Python is a really nice language!
@replikvltyoutube37277 ай бұрын
Is it possible to overwrite these keywords, like translate them for instance (even if it is bad practice)?
@Indently7 ай бұрын
With soft keywords you can assign new values to them, but with the built-in ones you would have to change the implementation of Python itself from what I understand. I once created a script that translated my own keywords into Python code, but it was silly and just for fun.
@НиколайКузьмин-с4р8 ай бұрын
Seems like keyword number 34 at 27:21 should be with and not while
@Indently8 ай бұрын
Thank you, it has been fixed!
@CLOCK-WORK7 ай бұрын
Hiw do you get and install the python you have?
@DrDeuteron8 ай бұрын
Now this is a separate video on coroutines. yield is not just a 'return' statement. It is also an assignment statement. If in a generator called 'foo', you have: new_value = yield old_value a user, baz, of that generator that has declared: def baz.. bar = foo() can then do: current_result = bar.send(my_value) which gets bars's old_value and stores it locally in baz's current_result while at the same time storing baz's my_value in bar's new_value. bar then waits there until anyone calls next(bar). at which point foo's code restarts execution. confused? good, so am I. But I have used these to write a text "continued line" unwrapper, and a clever spacecraft data packet reader in which the length of the packet is not known until the end of sensor scan--with NO, ZERO, NADA if-then clauses. Cyclic Complexity = 1, but it handles all cases WITHOUT indexing past/present data streams, even though the data reading depends on the values of the data stream at different timestamps (read: indices).
@JMCiller8 ай бұрын
What are the differences between try/except(raising an exception) and assert?
@marckiezeender8 ай бұрын
assert only works in debug mode, for one. It's basically shorthand for: if __debug__ and : raise AssertionError()
@falkez15147 ай бұрын
also, assert is specifically a bool check, try is made to be ready for any type of circumstance!
@Heavy_Lvy8 ай бұрын
got to be my favorite keyword 10:27
@yvg20092 ай бұрын
Can I create my own keyword like True? E.g. Pi = 3.14159? Directly in C files?
@llnobbi7ll7 ай бұрын
Great vid
@locust768 ай бұрын
I don't think I will ever be able to understand how lambda works. I use it in several of my projects to sort lists of dictionaries by keys, but how or why it works is anybody's guess.
@owtechS7 ай бұрын
Am with you on this one. But it is somehow important
@moho4723 ай бұрын
Lambdas are useful if you just want to do something like a deepcopy, or modifying data, without having to define a function. They're single use, and make your code cleaner.
@shailumishra-y3n4 ай бұрын
How many keywords in python latest version 3.12.0 35 or 39 please Riply any one🙏
@marykatherine40806 ай бұрын
Is this done in visual code studio plz reply
@olivergrim76346 ай бұрын
idk what that is, it looks like pycharm, both vs code and pycharm are good, pycharm is python specific
@moho4723 ай бұрын
@@olivergrim7634Visual Studio Code is another IDE, made by Microsoft.
@frozendude707Ай бұрын
yup, PyCharm on Mac
@markandrews12198 ай бұрын
What is the IDE in this demonstration?
@muralidharreddychalla38778 ай бұрын
pycharm
@АлексМихайлов-ч6э6 ай бұрын
Finaly some insight
@legionarius-z7x6 ай бұрын
Nice video
@callbettersaul8 ай бұрын
Something happened with 3rd chapter name ("None02:34 True")
@Indently8 ай бұрын
Thank you for pointing that out, I fixed it!
@anandraj28958 ай бұрын
informative thanks
@jacobmmcdonald8 ай бұрын
Assert should only be used for debugging. If the optimization flag is used and _ _debug_ _ is set to false, assert statements are not evaluated.
@falkez15147 ай бұрын
poor bob got so abused today, he even wrote a letter to indently through the .txt but no one cares...
@Cryptohustlerhub7 ай бұрын
Sorry bob
@JohnBerry-q1h6 ай бұрын
Which software developers’ implementation of PYTHON are the most reliable and least “buggy” ?
@Slipping_thru_the_Seams7 ай бұрын
thank you!
@anon_y_mousse8 ай бұрын
Apparently Python 3.9 doesn't have a soft keyword list, so I think I need to update. What's really weird is that my keyword list has __peg_parser__ in it and I have no clue what that does.
@sayanta017 ай бұрын
thanks you so much
@MadMan-3697 ай бұрын
Thanks ❤❤❤❤
@lhuguenin1008 ай бұрын
Can we please just agree that it’s insane for true and false to be capitalized???
@ゾカリクゾ8 ай бұрын
It's a bit weird yes, but at least True and False somewhat indicate that they are objects, not simple 1's and 0's like in other languages.
@alansnyder84488 ай бұрын
I'm actually okay with it capitalized, along with None. It makes it stand out in code.
@matthewsharp11787 ай бұрын
I’m fine with it
@lhuguenin1007 ай бұрын
I really thought I would get more support with this one hahah @@ゾカリクゾ that’s because in most languages they aren’t actually objects, they are just masks or macros for 1 and 0, which is more memory efficient. But in python everything is an object, there are no true types, which can be good for other reasons.
@itexpert41937 ай бұрын
good one
@chrisder18143 ай бұрын
hello could I write to you so that you can tell me what I think of the ideas I had
@joshix8338 ай бұрын
What about "async for" and "async with"?
@TheNameIsAQUILAАй бұрын
Justice for bob
@mikeogadono41964 ай бұрын
I started learning coding today .guys I need your support
@kbcat6 ай бұрын
why do you declare types
@olivergrim76346 ай бұрын
to make it more readable
@xjustinjx8 ай бұрын
wonder what this sounds like in a few years, at 2x. 35, never programmed, 30k? 40k? hours on the computer playing games. completing my first college programming class right now, currently have 100% going into finals. programming is fun.
@kapibara24408 ай бұрын
Good job! Bravo 😊
@dougiefresh23937 ай бұрын
Nicley done
@Macro-Mark5 ай бұрын
Great video. But why give Bob such a hard time 😂
@travisti95742 ай бұрын
3:50
@vryyx_6969Ай бұрын
9:25 facts
@Lighter7900music8 ай бұрын
Python has 39 keywords and not one const keyword.
@-Quran_kreem8 ай бұрын
Don't change the variable and it will not change.!!
@Lighter7900music8 ай бұрын
@@-Quran_kreem You're making a fool of yourself don't you think?
@cycrothelargeplanet8 ай бұрын
Just use allcaps to tell people it's a constant and hope they don't change it
@Lighter7900music8 ай бұрын
@@cycrothelargeplanet *Hope*
@Nbrother12348 ай бұрын
Use all caps for constants
@mr_hat55066 ай бұрын
JUSTICE FOR BOB!
@user-lg4le8xr4s8 ай бұрын
We do not say hello to Bob.
@MrSunTrope2 ай бұрын
Notimpemented?
@lmg88.804 ай бұрын
Thanks for the list. It is a clear explaination but you speak fast, maybe because you took a long time to film and by that time its understandable that you want to finish the video by speaking fast.
@thefanboy32858 ай бұрын
The first example is me: has_money: bool = False
@KabukkafaАй бұрын
Two "in"s in the thumbnail
@FroggyThicc4 ай бұрын
0:00
@TheManPrtagnst2 ай бұрын
If anyone sees this im trying to make python have a conversion and can say different things depending on what you say. I would like some help
@dan5e3s6ares7 ай бұрын
@deepdark2427 ай бұрын
All what person can do is work, because life is misarable ;d 9:25
@StrandgaardMorten4 ай бұрын
Liked. Subscribed
@rohitlearnscode6 ай бұрын
You explain well but the sequence of Keywords isn't right. You might want to consider re-uploading the video and sequencing the keywords from beginner level to advanced level rather than alphabetically.
@faelynOlayuАй бұрын
9:24 lol real
@robertpearson85467 ай бұрын
This reinforces my view that Python is just tarted up C. False is NOT 0.
@moho4723 ай бұрын
Python's interpreter, and the language itself, is built off C. You can actually read the C code that makes the Python Language.
@robertpearson85463 ай бұрын
@@moho472 They did alter the C code to play-pretend that they are doing functional programming and play-pretend they are doing object-oriented programming.