当输出的字符串含有多个变量时:
import numpy as np
y = [2018, 2019, 2020]
m = np.linspace(1, 12, 12, dtype=int)
_xtick_labels=[u"{}年{}月".format(year, mon) for year in y for mon in m]
print(_xtick_labels)
输出结果:
['2018年1月', '2018年2月', '2018年3月', '2018年4月', '2018年5月', '2018年6月', '2018年7月', '2018年8月', '2018年9月', '2018年10月', '2018年11月', '2018年12月', '2019年1月', '2019年2月', '2019年3月', '2019年4月', '2019年5月', '2019年6月', '2019年7月', '2019年8月', '2019年9月', '2019年10月', '2019年11月', '2019年12月', '2020年1月', '2020年2月', '2020年3月', '2020年4月', '2020年5月', '2020年6月', '2020年7月', '2020年8月', '2020年9月', '2020年10月', '2020年11月', '2020年12月']



