Python Arrays Flashcards

1
Q

This refers to a data structure that can hold more than one value at a time.

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It is a collection or ordered series of items at the same time.

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

It is used to identify the element in an array.

A

Index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The number of element present in the array.

A

Length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

This function is used to find the length and return an integer that is equal to the number of elements present in that array.

A

len()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

It is used to iterate over the times of an array specified number of times.

A

For loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It iterates the elements until a certain condition is met.

A

While loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

This function is used when we want to remove an element and return it.

A

pop()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

This function is used when we want to remove an element with a specific value without returning it.

A

remove()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It returns a range of elements that we have specified by the index number.

A

Slice (:)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This function is utilized to sort the elements of the array in ascending order.

A

sorted()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

This function is used to add a single element at the end of an array.

A

append()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

This function is used to add a more than one element at the end of an array.

A

extend()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This function is used to add an element at the specific position in an array.

A

insert()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

This function is used to remove all the elements from the list.

A

clear()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

This function is used to to return a copy of the list.

A

copy()

17
Q

This function is used to return the number of elements with the specified value.

A

count()

18
Q

This function is used to add the elements of a list (or any iterable), to the end of the current list.

A

extend()

19
Q

This function is used to return the index of the first element with the specified value.

A

index()

20
Q

This function is used to add an element at the specified position.

A

insert()

21
Q

This function is used to remove the element at a speicifed position.

A

pop()

22
Q

This function is used to remove the first item with the specified value.

A

remove()

23
Q

This function is used to reverse the order of the list.

A

reverse()

24
Q

Three types of array

A

*1D array
*2D array
*Multi D array