That depends on many factors. Living in a crowded European city I have plenty of shops in walking distance, protected sidewalks and a traffic nightmare. It would take me longer and I'd be much more likely to get into an accident when driving to any of the shops nearby; walking is easier and safer. If you have a city designed for cars like most US cities seem to be the story is very different.
Per se walking is definitely safer, given decent walking conditions. If all you got are sidewalk-less streets and only big shops that are a decent distance away, that's not the fault of walking but of bad city design. similarly in winter, if there's snow and your city clears the street but not the sidewalk then of course the sidewalk is less safe.
Per se walking is definitely safer, given decent walking conditions. If all you got are sidewalk-less streets and only big shops that are a decent distance away, that's not the fault of walking but of bad city design. similarly in winter, if there's snow and your city clears the street but not the sidewalk then of course the sidewalk is less safe.