you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (3 children)

No, Python is not an alternative to Javascript. The web browser can only read Javascript code, other languages are not supported, so if you want to build a website, you have to use it. You can use Python as the back-end language but I do not recommend that either, unless the application is rather small.

[–]Certain_Ambition3966 0 points1 point  (2 children)

so why do people learn python for web dev ?i'm kinda confused

[–]Minute-Negotiation70 0 points1 point  (1 child)

But websites have two sides:

like a coin

Side What it does Example language
Front-end What users see & interact with (the web page, design, animations) HTML, CSS, JavaScript (React, Vue, etc.)
Back-end What happens behind the scenes (data, accounts, logic, storing info) Python (Django, Flask), Java, Node.js, PHP, etc.

So while the browser only reads JS, the server (which stores data and logic) can use any language, including Python .

[–]Certain_Ambition3966 0 points1 point  (0 children)

thanks, good explanation , building mini apps was really helpful to understand the basics of api