My first Python script broke because I named a file the same as a library
So last Tuesday I was messing around with my very first Python project, a little script to rename all my vacation photos, and it kept crashing with this weird error I did not understand at all. I copied the code from a tutorial three times and it still would not run, which made me feel like I was just too dumb for coding. I finally posted my error in a beginner Discord and someone asked what I named the file. Turns out I saved it as random.py, and Python has a built in library called random, so my file was basically fighting itself. I renamed it to photo_rename.py and boom, it worked on the first try. I sat there for like 10 seconds just staring at my screen lol. The funny part is the tutorial never mentioned this could happen. Has anyone else broken their code with a dumb file name like that? I want to know I am not the only one.