Tag: object

  • 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…

  • Namespace and scope in Python

    Namespace and scope in Python are very much interrelated. In this section, we will take a look at this very important concept. Before giving an example we can take a look at the file systems in a computer. Suppose in C drive, we try to save a file under the same name. Will it allow…