我是python的新手,正在寻找一种简化以下方法的方法:
if atotal == ainitial:
print: "The population of A has not changed"
if btotal == binitial:
print: "The population of B has not changed"
if ctotal == cinitial:
print: "The population of C has not changed"
if dtotal == dinitial:
print: "The population of D has not changed"
Run Code Online (Sandbox Code Playgroud)
显然_total和_initial是预定义的.在此先感谢您的帮助.