The council shall also have power either by ordinance or resolution to cause and require the owners and occupants of any lot or premises to remove all snow and ice from the sidewalks in front of or adjacent to such lot and premises, and to keep the same free from obstructions, encroachments, encumbrances, filth, and other nuisances; provided, that the council may provide by ordinance for the removing of all ice or snow therefrom, and for keeping the same free from encumbrances and pay the expense thereof from the general city funds.