Error while inputing

Traceback (most recent call last):
File “./”, line 3, in
TypeError: ‘str’ object cannot be interpreted as an integer

Can you plse provide your solution, however this error arises when you try to use a string variable as an int. For eg- passing "5" to a range() function instead of 5.