Advance Functions in Python #02

 Advanced Functions in Python

While / For / Range commands

we can use While /For commands to loop some functions or calculations several times.
let's take a look that how they work in practically.
 

While loop




For loop

In the case we using for loop I will add rage command.
Range command can define a range of a list / tuple / etc.



NOTE:     In For loop We don't need to define a value for I (variable we using)
                In Range Command We Define (starting value here , End Value here )

Item Function

we can use function called Item for define the values of a dictionary /list/tuple etc...



In this case, we don't even want to define a variable.


 

Comments

Popular posts from this blog

Calculator v2.0 - python

Hacker Rank C Challenges #003

Advance Functions In Python