when we talk about python identifiers those used to declare variables, functions and etc.. we need to know that there is python reserved words 2.7 we can not use..
let’s list them
python reserved words 2.7
and del from not while as elif global or with assert else if pass yield break except import print class exec in raise continue finally is return def for lambda try
is an logical operator, used in condition testing and not very common in use
another one of python reserved words 2.7, it used with import statement, it gives the ability to add a library and give it a name to be used in your code
this helps you find bugs quick and easy by checking, it will be explained later
break statement is used to escape code scope, most common use case is with functions and loops
it do as it says, it used to declare classes, you will work with it over and over again
it’s more related to break statement, actually it just do the opposite job
more like class, used to define functions, you will see it so much specially if you one of functional programming lovers
the bad guy is del, it used to delete things like functions and variables and even classes, watch out xD
elif + if + else
oh man, you are mixing things up.. watch out
i meant to, why ? it’s so much related stuff – okay how ? let’s see
if statement puts interpreter in front of two choices and interpreter should choose based on condition test.
okay, what about elif, let me tell you
elif puts him on other choice if the first went false.
oh man, and else.. else just doing some code if either of them went true, learn more
except + try
mixing stuff again, it’s cool man, let’s see..
python has some built-in exceptions, okay. what if exception shows up then those statements catches it and handling this
used to run an app and ber important one of python reserved words 2.7
belongs to try, except. so there is no way the exception corrupt something
used for looping and iterating in sequences, learn more
from + import
used to get modules and libraries to our code, as import (module) from (package).
used to declare global variable inside private block of code.
it used for membership check, like element in a list
it used for identity check
A lambda function is a small anonymous function.
A lambda function can take any number of arguments, but can only have one expression.
not + or
is an logical operators, used in condition testing and not very common in use
used to pass some block of code like functions
the famous function that prints something on screen
it’s categorized under errors directory, so it could be helpful with try, and those keywords
statement causes your function to exit and hand back a value to its caller. The point of functions in general is to take in inputs and return something.
looping method doing stuff while iteration or condition is true, learn more
simple statement solving problems, details later on
To understand what does, you must understand what generators are. And before generators come iter, so it’ll be explained later on