In the past I wrote an article about the ‘4 Most Annoying Python features’ (Go check it out here btw). But I through it might be a bit nicer to compile a list of the ‘Best Python features’ as well. So enjoy the story…
1 — No template:
In C#, to execute console.Writeline();
(C#’s equivalent of pythons print
), you need to create a template. This normally requires typing using system
and then public class Program
and then public static void Main()
and finally, only then may you write your console.Writeline();
. Then finished code turns out like this:
8 Unnecessary lines taken up by template, However in python I think it speaks for itself…
These both do the exact same thing! Show the user some text that says ‘Hello World’
2 — Simple Understandable Language:
This is a C# program which asks the user for 3 products, and then prints them all out in alphabetical order:
This 23 lines is painstakingly long compared to what python can do:
Python did it in 9. C# took 14 lines more than python. The C# application is hard to read. However I recon someone who has never programmed a word in their life could understand the Python.
3 — Larger community:
Python has definitely got a larger community of people as it has had 1,947,816 questions asked on stack overflow, and 1,537,051 for C#. Python almost has a 400,000 question lead meaning that it definitely has more people answering questions. On the entire Stack Overflow platform, JavaScript has the largest community and Python is Second. C# is Fourth.
4 — Better for Beginners:
I think we can all agree that python is so good for beginners. C# is a very large complex programming language, you might think this is good, and to an extent — yes it is. However pythons simple nature comes into play with new users. Python has so many tutorials online, and can perform very well against C#. And as we saw in the Larger Community section (above), asking a question on Stack Overflow will be no problem as there are thousands of people helping out. It can do most things that C# does, and if not powerful enough for a project, It will be easy enough to transfer over to C# as python builds basic and important programming fundamentals that just need to be translated.
Conclusion:
Thank you for reading this article. To summarize these where the 4 points:
- No Template
- Simple Understandable Language
- Larger Community
- Better for Beginners
Please make sure to follow me as it really helps out and I hope you enjoyed this short story I put together. Please feel free to use any code snippets above for your personal use.