I wouldn't say that Lua is "better" than Python because they are quite different. To be honest, i don't like Python much, but that's personal taste.
That said, we can honestly confirm:
- Lua is minimalistic, and has a very small set of data type (one, in fact). This can be seen as a con, but a hashed data array is all we need. Plus, table format (the data type of Lua) is almost json format (the conversion is trivial).
- Lua is easy to learn (some caveats of course if you want full mastery). The reference book ("Programming in Lua") is quite slim, compared to the Python litterature.
- Lua is lightweight. If you have to deploy your script, that makes thing easier. Most of time, you just have to ship the script with the interpreter (not even needed if you have lua interpreter in execution path), and that's all.
- Lua is way faster than Python. For scripting, it can be marginal , but sometimes useful. For example, I was happy of its speed for a script which parse large amount of logs to update dynamically a firewall.
Lua has been used a lot in the past in game development, for scripting and controling C modules. Since the last ten years, that's not the case anymore. But for example, Grimrock use Lua (there had been some interesting posts about this on the Grimrocks's blog). Now that most of games are done with Unity or Unreal Engine, that's history.
I think you already know this framework, but just in case :
https://love2d.org/ (it uses LuaJit which is even faster than the "official" Lua interpreter).
Some folks i know use löve2D for scripting in their company (they have made a console quite easily with it, for controlling things).
Defold engine is using Lua too.
Now, if you need a lot of things (network support, web scrapping and so on), Python is far easier. Of course, you can do everything with Lua, but sometimes it will be slower to do than just import a lib with Python.
Another problem of Lua is the fragmentation of the community. There has been luajit , which as the name says jit Lua. But it has not evolved with Lua and it's stuck in 5.15 version (it supports some things from Lua 5.2, but not everything). The official Lua is v5.4 . But that's more a problem for the community itself than for scripting. For scripting, i recommend to use the official Lua.