我正在尝试打印的集合,用新的线条演示,比如列形状,而不是行或列表,到目前为止我还找不到解决方案。
def two_sets():
a = raw_input()
n = set(raw_input().split())
b = raw_input()
m = set(raw_input().split())
result = (n).symmetric_difference(m)
result = map(float , result )
print ("%s\n"%result)
two_sets()
输出:[11, 12, 5, 9]
但我想像这样走出来:
5
9
11
12
发布于 2019-06-15 00:24:40
请改用-
result = map(str , result)
print("\n".join(result))
https://stackoverflow.com/questions/56601523
复制相似问题