paint-brush
Cómo arreglar el Python TypeError: el objeto 'int' no es iterablepor@itsmycode
10,215 lecturas
10,215 lecturas

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

por Srinivas Ramakrishna2021/09/09
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
ES

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
Srinivas Ramakrishna

Srinivas Ramakrishna

@itsmycode

Blogger @ ItsMyCode

Sobre @itsmycode
LEARN MORE ABOUT @ITSMYCODE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Srinivas Ramakrishna HackerNoon profile picture
Srinivas Ramakrishna@itsmycode
Blogger @ ItsMyCode

ETIQUETAS

Languages

ESTE ARTÍCULO FUE PRESENTADO EN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite