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!
Localization dependent regex for this should be possible
It’s that hacker 4chan again
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.
Code doesn’t even pass the example test — mind your case sensitivity!
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.
doomed by case sensitivity
all he wanted was to get his cs101 hw done. all he got was computer reckt
Little Johnny “DROP TABLE ?” up to it again I see.
*Bobby.
Oh yes. Little Bobby Tables we call him.