modules = (path.splitext(m)[0] for m in module_files)
formatted = ('modules/%s/%s' % (module_type, m) for m in modules)
print('\n'.join(formatted))
Print variable line by line with string in front Python 2.7