Can you use both languages to build a website? A better, and more accurate question is this: Can you build the website in PHP, and use Python to execute other tasks? For example, maybe Python has a great, very particular library for accomplishing some task. Is there a standard protocol for communicating between PHP and Python?
A common use case may be that a bunch of data is collected through the PHP website (maybe stored in a MySQL database), passed to Python for some analysis, and then the Python returns it to the PHP (by perhaps storing it in a different location in the MySQL database) so the new analysis can be displayed on the website by the PHP. Any advice/pointers/references would be great.