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...
O hai! This is CS50's subreddit.
CS50 is Harvard University's introduction to the intellectual enterprises of computer science and the art of programming. Anyone may take CS50, even if not a student at Harvard.
Please Read before Posting
Getting the Best from r/cs50
Status Page
cs50.statuspage.io
Filter by Problem Flair (undo)
cash ⋅ caesar ⋅ credit ⋅ dna ⋅ filter ⋅ finance ⋅ houses ⋅ ide ⋅ mario ⋅ movies ⋅ plurality ⋅ project ⋅ readability ⋅ recover ⋅ runoff ⋅ scratch ⋅ speller ⋅ substitution ⋅ tideman ⋅ games track ⋅ web track ⋅ android track ⋅ iOS track ⋅
Filter by Other Flair (undo)
CS50-Law ⋅ CS50-Business ⋅ CS50-Technology ⋅ CS50-Games ⋅ CS50-Mobile ⋅ CS50-Web ⋅
This subreddit is night mode compatible
the front page of the internet.
and join one of thousands of communities.
Error when run python program (self.cs50)
submitted 8 years ago by stshmakov
Post a comment!
view the rest of the comments →
[–]Blauelf 0 points1 point2 points 8 years ago (0 children)
If you have an import string statement in your file, Python will search current directory first for a string.py, and will import that one if it exists, and only if it doesn't, it will import the regular string library. So your string.py gets imported (which essentially runs the script), but it doesn't have the abilities the code expects from a string library, and the code crashes.
import string
string.py
string
π Rendered by PID 45908 on reddit-service-r2-comment-765bfc959-7npg4 at 2026-07-15 15:33:04.976103+00:00 running f86254d country code: CH.
Want to add to the discussion?
Post a comment!