I got once disqualified from a programming competition for including cases like that - and I was even nice enough to not include the os.remove thing!
import os
Instant goblin behavior.
Terrible code.
os.remove does not remove folders, for that you want shutil.rmtree().
Best to just do the user data folder since that’s where you have permission anyway.
Is that the test driven programming everyone talks about?
Exactly. You write the tests first so you know exactly when not to remove Windows.
That would be true if there were tests. If you work in banking or any other field with very specific specs and regulations, the program is almost perfect and answers the demands of the client.
The undefined behavior is too much though, he should throw an exception instead.
It’s that hacker 4chan again
Localization dependent regex for this should be possible
Code doesn’t even pass the example test — mind your case sensitivity!
doomed by case sensitivity
Little Johnny “DROP TABLE ?” up to it again I see.
*Bobby.
The boy ain’t right.
Oh yes. Little Bobby Tables we call him.
all he wanted was to get his cs101 hw done. all he got was computer reckt