انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Array in python

Share |
الكلية كلية تكنولوجيا المعلومات     القسم قسم شبكات المعلومات     المرحلة 1
أستاذ المادة هبه امير جابر الخفاجي       28/04/2018 08:23:33
Python Arrays
In this lecture, you’ll learn about arrays in Python. More specifically, you will learn to create arrays, modify them, access elements and so on with the help of examples.
Table of Contents
? Python Array (Introduction)
? Create an Array
? Access elements of an Array o Array Index o Negative Indexing
? Find length of an Array
? Add an element to an Array
? Remove elements from an Array
? Modify elements of an Array o Python operators to modify elements in Array
? Slicing an Array? ? Python Array Methods
? Multidimensional Arrays
Arrays are fundamental part of most programming languages. It is the collection of elements of a single data type, eg. array of int, array of string.
However, in Python, there is no native array data structure. So, we use Python lists instead of an array.

Note: If you want to create real arrays in Python, you need to use NumPy s array data structure. For mathematical problems, NumPy Array is more efficient.
Unlike arrays, a single list can store elements of any data type and does everything an array does. We can store an integer, a float and a string inside the same list. So, it is more flexible to work with.
[10, 20, 30, 40, 50 ] is an example of what an array would look like in Python, but it is actually a list.

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم