setm = set()
for _ in range(m):
setm.add(map(int, input().split()))
n = int(input())
setn = set()
for _ in range(n):
setn.add(map(int, input().split()))
symdiff = setn.symmetric_difference(setm)
sortdiff = sorted(symdiff)
for num in sortdiff:
print(num) ```
i actually cant find the error within this code π also does anyone have a resource for learning other than leetcode and forums?
#π noob question but i really struggle with this lmao
30 messages Β· Page 1 of 1 (latest)
@lethal condor
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
it is supposed to map tuples or integers
set.add should take a single value.
use set.update instead
or set |= other
m = int(input())
setm = set()
for _ in range(m):
setm.update(map(int, input().split()))
n = int(input())
setn = set()
for _ in range(n):
setn.update(map(int, input().split()))
symdiff = setn.symmetric_difference(setm)
sortdiff = sorted(symdiff)
for num in sortdiff:
print(num)
ah i see
it still says this tho π
Traceback (most recent call last):
File "Solution.py", line 4, in <module>
EOFError
what does that even mean π
How are you running it?
EOFError means it reached the end of the file before it read anything
!e input()
:x: Your 3.12 eval job has completed with return code 1.
:warning: Note: input is not supported by the bot :warning:
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | input()
004 | EOFError: EOF when reading a line
Then it probably doesn't give you a terminal.
is there even any fix to that?
alright, thank you for the help
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.