I'm thinking of switching from using PHP to Python for web applications, but I was wondering if Python is as adept as weaving in and out of HTML as PHP is. Essentially, I find it very easy/intuitive to use <? and ?>
to put PHP where I want, and am then free to arrange/organize my HTML however I want. Is it just as easy to do this with Python? Fundamentally, the question is: is working with HTML with Python similar to working with HTML with PHP in terms of ease-of-use?
Edit: I guess to help clear up some of the confusion in the comments below, I get the intuition that PHP would be better than Python at organizing the front-end, presentation part of a website, while Python would excel at the back-end part (the actual programming...). The question is - am I wrong and is Python just as good as PHP for front-end?
Edit of my Edit: Ah, I'm starting to understand the error of my ways; it seems I have unknowingly picked up some bad habits. I always thought it was okay (read: standard) to, for example, have PHP in pseudo-code do the following:
If user has filled out form:
print this html
else:
print this html
When in fact I should use an HTML template, with the PHP in a sep. file. And in that scenario, PHP and Python are on an even fighting field and it's probably up to my own programming language tastes.