# Enumerate() function or class?

**URL:** <https://discuss.python.org/t/enumerate-function-or-class/10504>\
**Category:** Python Help\
**Created:** [September 8, 2021, 10:00am UTC](https://discuss.python.org/t/enumerate-function-or-class/10504 "2021-09-08T10:00:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Sanmitha-Sadhishkumar](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Sanmitha-Sadhishkumar](https://discuss.python.org/u/Sanmitha-Sadhishkumar)\
**Post date:** [September 8, 2021, 10:00am UTC](https://discuss.python.org/t/enumerate-function-or-class/10504/1 "2021-09-08T10:00:56Z")

</div>

I was learning about enumerate(). While learning, when I used,

> > > help(enumerate)

Help on class enumerate in module builtins:

class enumerate(object)  
| enumerate(iterable, start=0)  
|  
| Return an enumerate object.  
|  
| iterable  
| an object supporting iteration  
|  
| The enumerate object yields pairs containing a count (from start, which  
| defaults to zero) and a value yielded by the iterable argument.  
|  
| enumerate is useful for obtaining an indexed list:  
| (0, seq[0]), (1, seq[1]), (2, seq[2]), …  
|  
| Methods defined here:  
|  
| **getattribute** (self, name, /)

| Return getattr(self, name).  
|  
| **iter** (self, /)  
| Implement iter(self).  
|  
| **next** (self, /)  
| Implement next(self).  
|  
| **reduce** (…)  
| Return state information for pickling.  
|  
| ----------------------------------------------------------------------  
| Static methods defined here:  
|  
| **new** (\*args, \*\*kwargs) from builtins.type  
| Create and return a new object. See help(type) for accurate signature.

Even when I gave as,

> > > enumerate

Output was :  
\<class ‘enumerate’\>

But, when I checked the documentation in the official website of python, [www.python.org](http://www.python.org) for enumerate,

Here : [Built-in Functions — Python 3.12.1 documentation](https://docs.python.org/3/library/functions.html#enumerate)

It showed that enumerate() is a function which violated the information shown by help().

I couldn’t get whether enumerate() is a class or a function. Anyone please help me out of this please…

By the way, I had python 3.8.3. I even checked in python 3.6 and 3.7.10.

---

_[View the full topic](https://discuss.python.org/t/enumerate-function-or-class/10504)._
