From the course: Transition from C# to Python

Comparing C# and Python

From the course: Transition from C# to Python

Start my 1-month free trial

Comparing C# and Python

- [Instructor] If you're already an experienced C# developer, you might be wondering, what's so special about Python and why learn it? After all C# and .NET are pretty popular and have been around for quite some time now, so why bother learning a new language? I think there's several great reasons to do so. First Python programming is very productive and efficient, especially if you're prototyping something and you want to try out an idea quickly, But that doesn't mean you can't do real work with it. Python is very popular among some fields, such as data science, financial modeling, cloud software development, building command line tools, and a lot more. Python is also very flexible. It supports object oriented programming, so you can use it that way, or you can just write procedural code and not worry too much about using objects. It's up to you. There's a huge ecosystem built up around Python now. There are 100s of pre-built code modules that you can use in your projects, both built into the standard library, as well as available from third parties. Python forms the foundation of programming for some very popular products like the Raspberry Pi or the Django web framework, just to name a couple. Python runs almost everywhere. Just about every major operating system supports it, such as Windows, Mac, and Linux. So you can run your programs just about on any device that has a processor. All right, let's take a high-level look at C# compared to Python. So C# is a statically typed language with some support for dynamic typing, whereas Python is a dynamically typed language. C# code is compiled and built into an app before it is run. Python doesn't have this step. The code is just interpreted as it is executed. This makes Python a little bit slower than C#, but it makes the process of development very quick and simple. The C# language has grown over time to be very rich and expressive. There are all kinds of language constructs to solve a wide variety of programming problems. Python tends to focus more on simplicity and doesn't have a lot of the bells and whistles that languages like C# has. Historically C# has been used by enterprise and Azure developers along with in-house development for projects like Windows Forms. Python has found acceptance among data scientists, server side cloud developers, and hobbyists. Now both languages of course have large passionate user bases and after spending some time with Python yourself, you're probably going to understand why that is.

Contents