The mixing of logic, content, and presentation as naïvely encouraged by PHP is an abomination. It is the polar opposite of good design practice, and should not be imported to other languages (it shouldn't even be used in PHP, and thankfully the PHP world in general is ever so slowly moving away from it).
You should learn about Model-View-Controller (MVC) which, while not the final word on good real-world design, forms an important basis for modern web development practices, and serves as common ground, or a sort of lingua franca, in discussions about application layout.
Most of the time, you should be using some form of web framework, particularly one that provides templating. web2py is not a bad choice. Other popular frameworks include Pylons and Django.
Most Python web frameworks are very modular. You can use them in their entirety for everything in your app, or just bits and pieces. You might, for example, use Django's URL dispatcher, but not its models/ORM, or maybe you use everything in it except its templating engine, pulling in, say, Jinja. It's up to you.
You can even write traditional CGI scripts (take a look at the CGI module), while still using a templating engine of your choice.
You should start learning about all of these things and finding what works best for you. But the one thing you should not do is try to treat Python web development like PHP.