A python module is a single python file (.𝗽𝘆). An organized collection of such python files is called a python package. While developing large projects, it is a good practice to define an __𝗶𝗻𝗶𝘁__.𝗽𝘆 file inside a package. Consider 𝘁𝗿𝗮𝗶𝗻.𝗽𝘆 has a 𝗧𝗿𝗮𝗶𝗻𝗶𝗻𝗴 class and 𝘁𝗲𝘀𝘁.𝗽𝘆 has a 𝗧𝗲𝘀𝘁𝗶𝗻𝗴 class.
Import Your Python Package as a Module
Import Your Python Package as a Module
Import Your Python Package as a Module
A python module is a single python file (.𝗽𝘆). An organized collection of such python files is called a python package. While developing large projects, it is a good practice to define an __𝗶𝗻𝗶𝘁__.𝗽𝘆 file inside a package. Consider 𝘁𝗿𝗮𝗶𝗻.𝗽𝘆 has a 𝗧𝗿𝗮𝗶𝗻𝗶𝗻𝗴 class and 𝘁𝗲𝘀𝘁.𝗽𝘆 has a 𝗧𝗲𝘀𝘁𝗶𝗻𝗴 class.