Lesson 4 - Week 4: Python Structures Flashcards

(11 cards)

1
Q

Break

A

A special keyword in Python specifically designed for loops. If placed inside of a loop, it will immediately terminate the loop.

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

Continue

A

A Python keyword designed for loops. When Python reaches the continue keyword, it stops the code and goes back to the beginning of the loop.

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

input()

A

A built-in function that allows user input.

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

print()

A

A function used to display information to a user or to a developer.

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

list

A

A type of container in Python used to store multiple data sets at the same time.

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

append

A

A method to add a new element to the end of a list.

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

zip()

A

A function that takes iterables, aggregates them in a tuple, and returns.

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

set

A

An unordered collection of objects that is iterable, mutable, and has no duplicate elements.

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

index

A

A numerical representation of where each character is located.

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

slice

A

A subset of a string or other element.

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

len()

A

A function that returns the number of items in an object. When the object is a string, it returns the number of characters in the string.

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