From the course: Transition from C# to Python

Unlock the full course today

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

Arrays and lists

Arrays and lists

From the course: Transition from C# to Python

Start my 1-month free trial

Arrays and lists

- [Instructor] In this chapter, we're going to take a look at a couple of different kinds of collection classes that are supported in Python, and how they compare to their C-Sharp counterparts. And we're going to start with arrays. And these are very common data structures and they are well supported in both C-Sharp and Python. Sometimes you'll hear arrays referred to as lists in Python. So I'm going to use both terms here just for simplicity. So let's open up in Chapter Four, we're going to open the Arrays and Lists folder, and we'll take a look at the C-Sharp code first. And you can see that here in the C-Sharp example, I've created a variable using the generic list collection to hold a list of strings. And then the rest of the code exercises the list. So you can see that we add some items and then we add range of items, so it's more than one. And then we insert an item at a specific index. And you can see that we're printing…

Contents