Landslides seriously threaten human life and property. The rapid and accurate prediction of landslide geological hazard susceptibility is the key to disaster prevention and mitigation. Traditional landslide susceptibility evaluation methods have disadvantages in terms of factor classification and subjective weight determination. Based on this, this paper uses a random forest model built using Python language to predict the landslide susceptibility of Muli County in western Sichuan and outputs the factor weight and model accuracy. The results show that (1) the three most important factors are elevation, distance from the road, and average annual rainfall, and the sum of their weights is 67.54%; (2) the model’s performance is good, with ACC = 99.43%, precision = 99.3%, recall = 99.48%, and F1 = 99.39%; (3) the landslide development and susceptibility zoning factors are basically the same. Therefore, this model can effectively and accurately evaluate regional landslide susceptibility. However, there are some limitations: (1) the landslide information statistical table is incomplete; (2) there are demanding requirements in terms of training concentration relating to the definition of landslide and non-landslide point sets, and the landslide range should be accurately delineated according to field surveys.