Tag: list

  • Python Data Types : How they work

    Let’s embark on a journey into the fascinating world of Python data types, demystifying the concepts and shedding light on their connection with objects. As a Python enthusiast who loves to teach, I’m thrilled to guide you through this beginner-friendly exploration. Python Data Types: The Building Blocks of Information Imagine Python as a versatile toolbox,…

  • Variables and data types in Python

    Ah, Python variables and data types—a splendid place to embark on your coding journey! 🐍 You see, Python is like a linguistic marvel in the world of programming. For that reason, just as in a conversation, where words convey meaning, in Python, variables hold the keys to data. So, let’s delve into this captivating realm…

  • What is enumerate in Python

    The enumerate in Python is a built-in function. It takes an iterable object. And returns an iterator that produces tuples. The iterable object could be a list, tuple, or string. Moreover, it contains the index and the value of each element of the object. Here’s an example. Here we can use enumerate to iterate over…

  • What is for loop in Python give example?

    The for loop in Python is one of the main looping constructs. Usually we use the for loop when we want to iterate over the sequence.  This sequence could be a collection, such as tuple, list, or even a string. As a result of iteration, the placeholder variable takes every item as we iterate over…

  • Python list introduction

    We use python a list to store multiple items in a single variable. Therefore just like a String, it allows us to slice. Moreover, we can manipulate a python list at our whims.  Why? Because the python list is mutable. We can change any value of the python list. For example, we consider two lists…