query: Why do we put a main() function in python instead of just putting the code directly inside the "name == main" clause?
positive_passages.docid: 209
positive_passages.text: What does if __name__ == "__main__": do?
negative_passages.docid: 147437
negative_passages.text: Why no compiler error for main() without a return at the end?
negative_passages.docid: 120556
negative_passages.text: What does `` mean in Python?
negative_passages.docid: 145317
negative_passages.text: Is it possible that a variable declared after the main has file scope?
negative_passages.docid: 50792
negative_passages.text: In Python, what is the difference between ".append()" and "+= []"?
negative_passages.docid: 83972
negative_passages.text: Why do we need to use `int main` and not `void main` in C++?
negative_passages.docid: 145497
negative_passages.text: What does the  operator do in python?
negative_passages.docid: 61828
negative_passages.text: What is the Python equivalent of static variables inside a function?
negative_passages.docid: 13477
negative_passages.text: How is returning the output of a function different from printing it?
negative_passages.docid: 141719
negative_passages.text: NameError when using input()
negative_passages.docid: 90444
negative_passages.text: Difference between void main and int main in C/C++?
negative_passages.docid: 50330
negative_passages.text: What __init__ and self do in Python?
negative_passages.docid: 23124
negative_passages.text: Why use named function expressions?
negative_passages.docid: 90386
negative_passages.text: How does Karel run without "main" method?
negative_passages.docid: 112198
negative_passages.text: Global Variables vs. Local Variables
negative_passages.docid: 67678
negative_passages.text: When is "i += x" different from "i = i + x" in Python?
negative_passages.docid: 43261
negative_passages.text: Why main() method is needed in java main class