質問するログイン新規登録

回答編集履歴

1

同じsetならupdateしない

2019/12/18 09:18

投稿

shiracamus
shiracamus

スコア5406

answer CHANGED
@@ -12,7 +12,7 @@
12
12
  s = d[k]
13
13
  s.update(v)
14
14
  for c in v:
15
- if c in d:
15
+ if c in d and s != d[c]:
16
16
  s.update(d[c])
17
17
  break
18
18
  else: