python 中如何实现多个数组的输入

利用while 与try except的结合:

while True:
	try:
		year, month = map(int, input().split())
		print(year, month)
	except:
		break

发布了49 篇原创文章 · 获赞 2 · 访问量 1821

猜你喜欢

转载自blog.csdn.net/liuluTL/article/details/105389575