Here's my code:

```import math

print("Hey, lets solve Task 4 :)")

number1 = input("How many digits do you want to look at? ")
number2 = input("What would you like the digits to add up to? ")

if number1 == 1:
cow = range(0,10)
elif number1 == 2:
cow = range(10,100)
elif number1 == 3:
cow = range(100,1000)
elif number1 == 4:
cow = range(1000,10000)
elif number1 == 5:
cow = range(10000,100000)
elif number1 == 6:
cow = range(100000,1000000)
elif number1 == 7:
cow = range(1000000,10000000)
elif number1 == 8:
cow = range(10000000,100000000)
elif number1 == 9:
cow = range(100000000,1000000000)
elif number1 == 10:
cow = range(1000000000,10000000000)

number3 = cow[-1] + 1

n = 0
while n < number3:
number4 = list(cow[n])
n += 1
```

I am looking to make a loop so that for each element in the list, it will get broken down into each of it's characters. For example, say the number 137 was in the list then it would be turned into [1,3,7]. Then I want to add these numbers together (I haven't started that bit yet but I have some idea of how to do it).

However, I keep getting this error message:

```TypeError: 'int' object is not iterable
```

What am I doing wrong?

Dec 21, 2022 in Python 514 views

## TypeError: 'NoneType' object is not iterable in Python

What does this error mean?  I get this ...READ MORE

## Python TypeError: 'list' object is not callable.

The error says the list is not ...READ MORE

## i am normalizing the data set iris in python and get the error ::TypeError: 'numpy.float64' object is not callable

TRY THIS   #Nomalisation for i in names:     print(i)   ...READ MORE

## TypeError: 'list' object is not callable in python

I am a beginner in Python, created ...READ MORE

## Error: 'int' object is not subscriptable - Python

The issue is in the line: int([x[age1]]) The solution ...READ MORE

## TypeError: 'int' object is not callable

This is the code : from __future__ import ...READ MORE

## how do i change string to a list?

suppose you have a string with a ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote