How should I go about turning my JavaScript functions into Python functions so as to have my project's code structure as close as possible to what I already have? Would for instance Python functions run embedded in HTML as JavaScript functions do? Of course, I did not try that yet and I am assuming it is not that simple, but I don't understand why. Would it only be because browsers don't have Python available out of the box?
<script type="text/python">
def myFunction (x):
if x > 10:
print("x is larger than 10")
</script>
instead of:
<script type="text/javascript">
function myFunction () {
if (x > 10) {
alert("x is larger than 10");
}
}
</script>