2.4 Putting It Together

The following is a sample document:

<HTML>
<BODY>
<%

import string

t = string.replace("foo", "bar", "This says bar: foo")
%>

<P>
The following string came from the above code: <%= t %>
<%-- This comment does not appear in the output --%>

</BODY>
</HTML>

And it produces this output:

Content-type: text/html


<HTML>
<BODY>


<P>
The following string came from the above code: foo


</BODY>
</HTML>