r/learnpython • u/pedrinjose • 9d ago
Basically, if main
In Python, when you run your program in another folder, we add this, but I don't understand why. What's the point of doing this? If someone could explain it in a simplified way, I'd appreciate it.
10
Upvotes
View all comments
Show parent comment
1
u/Adrewmc 8d ago edited 8d ago
But I’m saying the use cases are extremely limited (and it best to have a better design) and learn Python yeah…it exists
By the time you get to argparse…you have a firm grasp of the language. And you can do what you want.
It’s mostly a distraction for beginners.
Most beginners, should only be aware of it, but not be using it.