+ 5

What are the main differences between Python and JavaScript?

29th Jun 2020, 4:07 AM
Kholiqov Abdulloh
Kholiqov Abdulloh - avatar
37 Answers
+ 14
Sigh... There are days I wish I was more ignorant about programming and the differences between many of these languages. Both articles are painful to read as they're both based on the same outdated or simply incorrect information. While a lot of what is written is correct, a good deal of the differences listed are partially or completely wrong. There are way too many unqualified people writing these articles these days. It's really sad how bad this content has gotten on the internet these days.
29th Jun 2020, 5:47 AM
David Carroll
David Carroll - avatar
29th Jun 2020, 4:17 AM
Nilesh
Nilesh - avatar
+ 10
Kholiqov Abdulloh why don't you just start learning JavaScript and tell us the difference then.
29th Jun 2020, 4:24 AM
CalviÕ²
CalviÕ² - avatar
+ 9
There are a lot. Visit herešŸ‘‡ for detailed info https://hackr.io/blog/JUMP_LINK__&&__python__&&__JUMP_LINK-vs-javascript
29th Jun 2020, 4:09 AM
Arsenic
Arsenic - avatar
+ 8
3. Design JavaScript is prototype-based. Classes, functions, objects all descendant of the prototype chain. It might be confusing if you have not used such languages before. Python is a procedural and object-oriented programming language. Presence of lambda functions and other features also make it possible to use functional programming style. In python though where you will have problem is with the variables. There is no keyword to define a variable. They are automatically initialized when they first appear. This might be a problem for some to know where a variable was designed. 4. Built-in libraries Python set of built-in libraries and methods has no match with that of JavaScript. If you are looking to venture into AI, data science or machine learning. Python is a good choice 5. Portability JavaScript is very portable and works on a variety of devices with almost the same code base. With Python cross-platform apps are a challenge. Various python modules rely heavily on GCC
29th Jun 2020, 6:54 AM
Ore
Ore - avatar
+ 7
PythonĀ is someway rigid e.g.- 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 procedurally programming whereas Java-Script does not have. This is all I know about.. thank you :)
30th Jun 2020, 6:28 PM
Aditya
Aditya - avatar
+ 6
I will not bore you with python vs javascript "war". They don't help irl. The obvious differences which might help you in choosing what to learn will be made clear. 1. Syntax Python does not use curly braces to delimit blocks. It is aimed at making code as suiting to the eye as possible. It uses indentation so most python codes are probably well indented. This does not mean there are no {} in Python codes. They are used for something else. Python prefers people to write things explicitly. So ternaries are like this do_it() if is_time else wait() JavaScript is shorter and less readable is_time ? do_it() : wait() 2. Implementation Python runs on the python interpreter which as this time is not shipped into any major browser. So it can't run in the browser. However you can use one of those libraries that compiles python code to javascript on-the-fly in the server-side. JavaScript engine is shipped into all major browsers and can work on most browsers directly which is faster. (...continued)
29th Jun 2020, 6:41 AM
Ore
Ore - avatar
+ 6
They're totally different languages with different syntax
30th Jun 2020, 4:00 PM
Mahmud Oyshik
Mahmud Oyshik - avatar
+ 5
Calvin, very smart idea. šŸ˜šŸ‘šŸ»
29th Jun 2020, 4:25 AM
Kholiqov Abdulloh
Kholiqov Abdulloh - avatar
+ 5
LOKESH CHAUHAN Python is also duck typed or weakly typed.
30th Jun 2020, 6:26 AM
Ore
Ore - avatar
+ 3
Ore thank you very much šŸ˜„. I'm not quite sure to choose among data scientist, software developer, and web developer. I don't have much information and/or experience to efficiently differentiate them and choose one that goes well with me. Till the time I explore my interest, I want to learn JavaScript, HTML, and CSS after completing my Python course.
29th Jun 2020, 7:23 AM
Kholiqov Abdulloh
Kholiqov Abdulloh - avatar
+ 3
Kholiqov Abdulloh There is no wrong choice. Choose what field you love most. If unsure try any and see if you like it.
29th Jun 2020, 7:26 AM
Ore
Ore - avatar
+ 2
Kholiqov Abdulloh Idk. It totally depends on you. Also research on what is on demand in your locality. It might help in making a decision. Note that this is not one of those life changing career decision. Since you are learning for free, you can always stop learning something you don't like and start something new until you find your interest.
29th Jun 2020, 7:32 AM
Ore
Ore - avatar
+ 2
Very nice! Thank you!
29th Jun 2020, 7:33 AM
Kholiqov Abdulloh
Kholiqov Abdulloh - avatar
+ 2
Javascript is a scripting language built to run on webpages whereas python is a general purpose programming language..
29th Jun 2020, 12:27 PM
Md Adil Hossain
Md Adil Hossain - avatar
+ 2
id just learn both :/ ik that may sound like a lot but python is extremly easy currently im learning html, css, and javascript. my plan is to get at least a bsic understanding of all the languages. but learning java and python can be usful (as i said again python is good for beginners so you could leanr both at once).
29th Jun 2020, 6:57 PM
Parkā€™s Productions
Parkā€™s Productions - avatar
+ 2
JavaScript can be written in strong type with Typescript
30th Jun 2020, 1:10 AM
CalviÕ²
CalviÕ² - avatar
+ 2
Python is object oriented programming language. JavaScript is scripting language
30th Jun 2020, 3:36 PM
aravind
aravind - avatar
+ 2
Javascript isĀ notĀ an object orientedĀ language,Ā but itĀ doesĀ have objects,Ā pythonĀ on theĀ other handĀ is very object oriented. Ā The syntax is quite different, Javascript uses the C notationĀ and uses curlyĀ brackets forĀ closures andĀ bloks, while python justĀ uses spacing.
30th Jun 2020, 4:41 PM
šŸ’•šŸ’žšŸ’•NeelamšŸ’•šŸ’žšŸ’•
+ 2
one is for browsers the other is general purpise
30th Jun 2020, 9:59 PM
Cameron Reape
Cameron Reape - avatar