How to get the addons path using python?
An add-on is just a regular python module so there are  multiple ways to get the actual path.
You can use addon_utils, a module for addon management that comes with blender to filter the add-on and get the path:
import addon_utils
for mod in addon_utils.modules():
    print(mod.bl_info.get(&quot;name&quot;))
    print(mod.__file__)

Or you can iterate through all enabled addons and use sys.modules dict:
import bpy
import sys

context = bpy.context

for mod_name in context.preferences.addons.keys():
    mod = sys.modules[mod_name]
    print(mod.__file__)

Related: How can I get a list of the installed addons using the API?