Walmart has benefited in part from higher inflation under Trump, as consumers have turned to its stores and website in search of lower prices.