python vs javascript

JavaScript
If you are a beginner python is the best because. Javascript has complex statements.// JavaScript is more confusing!!!'canal'.lastIndexOf('a');     // retorna 3
'canal'.lastIndexOf('a', 2);  // retorna 1
'canal'.lastIndexOf('a', 0);  // retorna -1
'canal'.lastIndexOf('x');     // retorna -1
'canal'.lastIndexOf('c', -5); // retorna 0
'canal'.lastIndexOf('c', 0);  // retorna 0
'canal'.lastIndexOf('');      // retorna 5
'canal'.lastIndexOf('', 2);   // retorna 2
Javascript is more for web development.
Python is an all purpose programming language, including web development. (Only backend)Python lets you do multiple things.
javascript for web development.
in html theres no way to use python
but there is a way to use javascript with the
<script> </script> tag// Python is strongly typed – no implicit conversion between types whereas JavaScript is weakly typed. ... JavaScript can be used to run on frontend whereas python is on server side programming or backend. Python has procedural programming whereas Java-Script does not have.
Source

Also in JavaScript: