It is unlawful for any person to spit or expectorate upon any of the public sidewalks, crosswalks, passes, byways or paths in the city, or upon the floor or steps of the public building, store, hotel, church, opera house, office room, schoolhouse or any other building in the city in which persons are in the habit of frequenting, assembling or congregating.