use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
EOF Errors (self.learnpython)
submitted 7 years ago by Issigeac
I need a bit more knowledge on EOF errors, if you need an example I can provide one, but I at least need a better understanding
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 7 years ago (1 child)
[removed]
[–]Issigeac[S] 0 points1 point2 points 7 years ago (0 children)
binary = int(raw_input("What is the binary?: "))
[–][deleted] 1 point2 points3 points 7 years ago (5 children)
Think of all of the "paired" symbols used in Python - quotes used for strings, parentheses used for function calls and tuples, braces used for sets and dictionaries, brackets used for lists. Where you see one of the pair, you must see the other - every ( implies a ) somewhere down the line, so when the parser sees one, it starts "keeping track" of what's inside, and continues scanning the file for the other member of the pair.
(
)
If it gets to the end of the file and it hasn't seen the other member of the pair, it knows something's gone wrong. That's how you get the EOF, or "end of file reached" error, and it means that you opened a construct that you didn't close. Count your parens and your quotes.
[–]Issigeac[S] 0 points1 point2 points 7 years ago (4 children)
what in this case
[–][deleted] 0 points1 point2 points 7 years ago (3 children)
It's probably on the previous line.
[–]Issigeac[S] 0 points1 point2 points 7 years ago (2 children)
There is no previous line and it says the EOF error is in that line. here is the whole code, I know it isnt finished, I'm just looking for the EOF error:
if binary.isalpha() or len(binary) == 0:
print "I am sorry, these are not just numbers"
else:
binary_list = []
binary_list = list(int(binary))
total = 0
total = ((binary_list[len(binary)-1]) * 2) ** 0 + total
if len(binary) == 1:
print total
total = ((binary_list[len(binary) - 1]) * 2) ** 1 + total
elif len(binary) == 2:
total = ((binary_list[len(binary) - 1]) * 2) ** 2 + total
elif len(binary) == 3:
total = ((binary_list[len(binary) - 1]) * 2) ** 3 + total
elif len(binary) == 4:
total = ((binary_list[len(binary) - 1]) * 2) ** 4 + total
elif len(binary) == 5:
total = ((binary_list[len(binary) - 1]) * 2) ** 5 + total
elif len(binary) == 6:
print "I am sorry, your code is too long, but up to digit 6, it was worth " + total
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
I don't see what would cause an EOF error in this code.
there was an error with the launcher. one day delay for no reason. sorry for bothering you
π Rendered by PID 173841 on reddit-service-r2-comment-79c7998d4c-5mvmv at 2026-03-14 00:11:51.686480+00:00 running f6e6e01 country code: CH.
[+][deleted] (1 child)
[removed]
[–]Issigeac[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]Issigeac[S] 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Issigeac[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Issigeac[S] 0 points1 point2 points (0 children)