Return multiple statements in Python Flask in the same route

return house_price, rent_price, home_size returns a tuple structured as (house_price, rent_price, home_price,)

So you have to replace

house_price = zillow.zillow_data(address, zipcode)
rent_price = zillow.zillow_data(address, zipcode)
home_size = zillow.zillow_data(address, zipcode)

with:

house_price, rent_price, home_price = zillow.zillow_data(address, zipcode)

Because every call to zillow.zillow_data(address, zipcode) just returns same tuple over and over.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top