DEV Community

Cover image for This is Why Python is Easier
Hillary Nyakundi
Hillary Nyakundi

Posted on

This is Why Python is Easier

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

Top comments (3)

Collapse
 
otumianempire profile image
Michael Otu

It can get complex you know..

Collapse
 
larymak profile image
Hillary Nyakundi

yeah, but not that complex

Collapse
 
larymak profile image
Hillary Nyakundi

but still I would choose it over the others