DEV Community

loading...
Cover image for This is Why Python is Easier

This is Why Python is Easier

larymak profile image lary mak ・1 min read

One of the reasons that I happen to love python is that its easier to write the code.
Take for instance writing a python code that prints Python is simple.

  • To write this kind of output in C++ it is going to be like this:
#include <iostream.h>
int main()
{
cout<<"Python is simple";
return 0;
}
Enter fullscreen mode Exit fullscreen mode
  • To write the same output in Java:
class hope{
public static void main(string[]args)
{
system.out.println("Python is simple");
}
}
Enter fullscreen mode Exit fullscreen mode
  • But to write the sane code in Python you only need 1 line of code
print("Python is Simple")
Enter fullscreen mode Exit fullscreen mode

Discussion (3)

pic
Editor guide
Collapse
otumianempire profile image
Otu Michael

It can get complex you know..

Collapse
larymak profile image
lary mak Author

yeah, but not that complex

Collapse
larymak profile image
lary mak Author

but still I would choose it over the others