lekcia 4 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

ake pozname datpve typy

A

list, tuple, set, dictionary

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

list

A

ordered collection= [1, 2, 3] zmiesane data

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

tuple

A

non-modification ordered collection (1, 2, 3)

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

set

A

unorganized collection of unique values {1, 2, 3} nahadzane v taske kazde raz

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

dictionary

A

unordered (key,value) mapping {‘a’:1, ‘b’:2, ‘c’:3}

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

indexovanie

A

grocery_list[:3] vyberie hodnoty 0 1 2

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

zaporne indexovanie

A

grocery_list[:-3] grocery_list[-3:]

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

zamen element v list

A

grocery_list[2] = “Green Juice”

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

dodaj, vloz element v list

A

grocery_list.append(‘Apples’)

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

vloz element v list

A

grocery_list.insert(3, ‘Oranges’)

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

vymaz element v list

A

grocery_list.remove(‘Oranges’)

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

zorad list

A

grocery_list.sort()

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

spoj listy

A

list_both = list_first + list_second

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

vynasob listy

A

multiplied_list = numbers_list * 3

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

vytvor tuple s list

A

grocery_tuple = tuple(grocery_list)

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