SET MATERIAL

Hello, How can i set  specified soil material by using python code ? ı mean i have three kind of soil volume but  all i want to change just  one of them.Is there someone who has an idea? thank you