Cómo arreglar el Python TypeError: el objeto 'int' no es iterablepor@itsmycode
8,665 lecturas

Cómo arreglar el Python TypeError: el objeto 'int' no es iterable

2021/09/09
por @itsmycode 8,665 lecturas
tldt arrow
ES
Read on Terminal Reader
Read this story w/o Javascript

Demasiado Largo; Para Leer

Los objetos int no son iterables directamente ya que contienen un único valor entero y no contienen el método \*\*‘`__iter__`‘ \**. En lugar de usar int, intente usar list si tiene sentido, y se puede iterar usando for y while loop fácilmente. Intenta usar el método `range()` en el ciclo for, que eventualmente generará una lista de números secuenciales.
featured image - Cómo arreglar el Python TypeError: el objeto 'int' no es iterable
Srinivas Ramakrishna HackerNoon profile picture

@itsmycode

Srinivas Ramakrishna

react to story with heart

HISTORIAS RELACIONADAS

L O A D I N G
. . . comments & more!