From the course: Transition from C# to Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Built-in functions

Built-in functions

From the course: Transition from C# to Python

Start my 1-month free trial

Built-in functions

- [Instructor] One of the key differences between Python and C# is that Python provides a rich set of built-in functions that perform a wide variety of operations that in C# would normally be provided as methods or properties on individual classes. So in this example, we're going to take a look at a small set of these, and then I encourage you to explore the others on your own. So let's open up the built-in functions example file, and that's the start version here. And I've already defined some sample data to work with. So let's try some of the functions out. So let's start with the length function named len. This function returns the length of any sequence type such as an array or a string. So to get the length of the numbers, I can just simply print length of numbers. Or to get the length of the string, it's the same thing. I would just simply use length on some string. So let's save, and then let's go over to the terminal,…

Contents