Python常用的格式字符串方法 使用传统的字符串连接和格式化: print('月份数量:', m) 使用 f-string 格式化 (从 Python 3.6 开始引入): print(f'月份数量:{m}')