Enumerate with Python

Enumerate with Python

 


I am here again to talk python. This week we learnt data structures and functions that are used in python. I will have to say, everything becomes simpler when you are doing it with python. 


We all imagine of a life free of conundrums and clear as crystal. But it is unachievable, that's life. Python life, however, is enumerated one thereby making everything and anything to be found always at the correct place. Data Structures and functions play an important role in achieving that beautiful goal. Let's talk about them...


No alt text provided for this image

Data structures

Data structures store the data values in any programming language. The mapping of correct input type with correct output type is dependent on them. In python, there are various data structures like string and tuple [immutable], list and dictionary [mutable].


  •  There are various methods that these data structures can implement. One such method is 'enumerate()'. The literal meaning of enumerate is to order things one by one and that’s what it does in python, it orders values for you. 


  •  There are minute differences in the syntax of these data structures. List is identified with [ ], tuple with ( ), dictionary with {Key:Value, Key:Value} and set with {Value,Value}. Also, I learnt that this language is pretty smart and understands user requirements.
No alt text provided for this image

Functions

A function, as our instructor quotes, is a set of instructions that is used to perform a single related operation. Python provides us with various in-built functions and allows the user to develop their functions too. 


  • With its wide range of inbuilt functions, every longer code shrinks to a few lines. These functions can be organized, reused, and modularized to perform big operations in adequate code lines.


  • There is this lambda Function that works in single line code. Isn’t it exciting? Bigger and longer problems have smaller to smallest solutions in python. We can even assign a new value to a global keyword using the keyword ‘global’. 


Before going, did you know that python abstracts most of its functionalities from users? Right from hiding the real executable file to the simple working of functions. Everything shown to the user is not only relevant but is the only thing that the user needs to know. 


Then, with a gist of error and exception handling, this week’s classes ended. I am so excited to learn new things about python. Next week, we are going to learn about error and exception handling.

I will update you with what I learn in my third blog of “Let’s talk python”. 

 

 

要查看或添加评论,请登录

Rohit S ModGil的更多文章

  • What and why is a Convolutional Neural Network?

    What and why is a Convolutional Neural Network?

    "Wow, your shoes look amazing!" "I love that black tie on you." "Those squared goggles do not suit your oval face".

    1 条评论
  • Gradient Descent in the Real-world

    Gradient Descent in the Real-world

    Do you see the Ape in the image? Well, the ape is blind and to add more, it is famished. It wants to eat that banana…

  • Data visualization in python

    Data visualization in python

    Data analysis is about understanding and interpreting the loads and loads of data that is being collected worldwide to…

  • 3...2...1...Happy New Python!

    3...2...1...Happy New Python!

    Happy New Year! To all the readers, may this year bring you love, wisdom, health, and success! We are entering the year…

    2 条评论
  • OOPS! Python!

    OOPS! Python!

    Well, here I am with my 4th blog in "Let's talk python". Due to my exams, I was quite busy and thus couldn't upload any…

    2 条评论
  • Python: An exceptional language

    Python: An exceptional language

    This is my third blog in “Let’s talk Python”. I am grateful to Shoolini University for providing me with such an…

    4 条评论
  • Python: The Master Programming Language

    Python: The Master Programming Language

    I am Rohit S Modgil. Under Shoolini University’s AI-ML Super 20 program, I am starting my journey to learn python for…

社区洞察

其他会员也浏览了