Incorporated towns and cities of the first and second class are empowered to order the owner of lots and other real property within their towns or cities to cut weeds; to remove garbage, rubbish, and other unsightly and unsanitary articles and things upon the property; and to eliminate, fill up, or remove stagnant pools of water or any other unsanitary thing, place, or condition which might become a breeding place for mosquitoes, flies, and germs harmful to the health of the community, after the town or city has provided therefor by an ordinance to that effect.