Why use ` if __name__ == '__main__': ` in Python?

Subscribers:
632
Published on ● Video Link: https://www.youtube.com/watch?v=L9Lk08nKKVY



Duration: 4:25
245 views
0


Sometimes in Python scripts, you will see this line of code:

`if __name__ == '__main__': `

What's that all about?

Watch on and see.