You are viewing a single comment's thread. Return to all comments →
Hi, just a slight modification, this below also works,
in place of ,
for i in range(n[1]): print(' '.join(map(str, d[input()])) or -1)
we can do,
for i in range(n[1]): print(*d[input()] or -1)
Seems like cookies are disabled on this browser, please enable them to open this website
DefaultDict Tutorial
You are viewing a single comment's thread. Return to all comments →
Hi, just a slight modification, this below also works,
in place of ,
we can do,