What does the error message “float object is not iterable” mean in Python?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hi there! This error generally means you’re tryin to loop over a float number, which is not possible in Python. In Python, you only can iterate over iterable objects(like lists, strings, etc). Floats ain’t iterable. Check your code, see if you’re trying to use a float as an iterable. If so, you’d probably need to change that bit of your code to resolve the error! Hope this helps you out a bit!