0

Do you need an 'int main()' in python?

15th Apr 2021, 8:05 AM
programmeester
programmeester - avatar
3 RĂ©ponses
+ 6
Definitely not. That's not even valid python. It's often a good idea to include a `def main():` block, and a good thing to put at the end of any file is an `if __name__ == "__main__":` block to specify what should be done when the file is run by itself.
15th Apr 2021, 8:33 AM
Myk Dowling
Myk Dowling - avatar
+ 2
Ray Libbenga No ways It's not valid on python. It's valid in C programming
16th Apr 2021, 12:03 AM
â€ïžđŸ˜PreranađŸ˜â€ïž
â€ïžđŸ˜PreranađŸ˜â€ïž - avatar
0
Oke, thanks
15th Apr 2021, 9:44 AM
programmeester
programmeester - avatar