I would like to learn python
Can python handle this type of application
Yes, and yes.
Working on a project that you’re motivated to do is a great way to learn new languages. Arguably the best way.
Both PHP and Python can handle this, but Python is a bit more common in purpose-specific application development. If you’re building skills that are suitable for employment, you’ll find that demand for Python is stronger than PHP these days.
If you want something that’s generic and “pretty much runs everywhere”, PHP is a popular option. The fact that you can just drop the files in and run with it is both the biggest strength of PHP, and it’s biggest weakness.
Deploying Python apps is generally a bit harder, requiring a little of knowledge reverse proxies for production deployment. But it’s only hard in comparison, skimming a “Python production deployment best practices” article will point you in the right direction.
should I stick with a LAMP stack
Nginx is a bit more popular in Python-land than Apache httpd because of the superior reverse proxy functionality. It’s also suitable for PHP applications that don’t rely on .htaccess functionality (.htaccess is terrible, you really shouldn’t be using it on Apache either, but many PHP apps rely on it.)