Convert the following code from Java to Python:

public class HelloWorld {
 public static void main(String[] args) {
 System.out.println("Hello World");
 }
}
public class HelloWorld { 
 public static void main(String[] args) {
 System.out.println("Hello World");
 }
}
def main():
 print("Hello World")

if __name__ == "__main__":
 main()