55. Tuples Flashcards

1
Q

what is a tuple?

A

Immutable lists.

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

what can you do?

A

-find numbers, and print a number

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

how do you write it?

A

my_tuple = (1,2,3,4,5)
print(5 in my_tuple)

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

what does .item?

A

puts everything as tuple

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

what are 2 methods of tuples?

A

count and index

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