I have tried the command import math
and then print(math.a) where in the init.py file contains a=1 but I am getting this error:
Please help. I have initialised the init file but still it is not recognising it in the main file.
I have tried the command import math
and then print(math.a) where in the init.py file contains a=1 but I am getting this error:
Please help. I have initialised the init file but still it is not recognising it in the main file.
I am not able to import the created package and use it in the main file
Sir I got my mistake. Actually math which has been depicted in the video is a built-in package and therefore I am not able to access and use my files. I renamed it to maths and it is working.