Город МОСКОВСКИЙ
00:04:25

TypeError: 'int' object is not iterable - Solved

Аватар
Реактивный Ликбез
Просмотры:
22
Дата загрузки:
28.11.2023 12:54
Длительность:
00:04:25
Категория:
Лайфхаки

Описание

#python tutorial: #codefix #python #python_tutorials
TypeError: 'int' object is not iterable - Solved
Hello friend in this video i will help you to learn why int object is not iterable errors comes, and how to solve this error?

Basically int object not iterable error comes when we try to iterate number with help of loop. so to sort out this error first you need to know what are iterable objects in python language? in python you can iterate these data types.
1. List
2. Tuple
3. Set
4. Dictionaries
5. String
so if you try to iterate number it will give you int object is not iterable error, as number is not breakable or itrable thing.
so you need to be careful when you write your python loop. you can only iterate list, tuple, set, dict, string in python language.

here is exact code i used for this video.
#TypeError: 'int' object is not iterable
# number = 10
# for i in number:
# print(i)

#list, dictionary,string,tuple,set
names = {"Rajiv","Pratham","Priyanshi"}
#print(type(names))
for name in names:
print(name)

hope this will help you to sort out type error int object is not iterable and finally this problem is solved for you.
Thanks for watching this video, hit like and subscribe for my codefix channel , so you can learn new stuff too.

Rajiv .
▶▶▶Learn More◀◀◀

.http://www.youtube.com/watch?v=s1HKiHhpYeA

http://www.youtube.com/watch?v=HnJvskV6SPY

http://www.youtube.com/watch?v=ryEyLwkeFQY

http://www.youtube.com/watch?v=PIZT6YmZVN0

http://www.youtube.com/watch?v=7MFIHvHR-yg

http://www.youtube.com/watch?v=PaLX77fj2dk

http://www.youtube.com/watch?v=qm6R3nLBNUE

http://www.youtube.com/watch?v=gEllFo4Z4g4

http://www.youtube.com/watch?v=G7GQJ-OX3Yk

http://www.youtube.com/watch?v=Y1rD-WWUtp4

http://www.youtube.com/watch?v=_LVobVNFvpc

Рекомендуемые видео