Yes they can, but a “life sentence” means something different in different countries. Norway’s is only 21 years. Some countries have abolished life in prison as they’ve abolished the death penalty. Pakistan has the death penalty but they don’t use it very often.