Chapter 5 Sequences, Strings, Lists, and Files Flashcards

1
Q

True or False
In Python “4” + “5” is “45”

A

False

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

True or False
Both Python lists and strings are mutable.

A

False

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

What function gives the Unicode value of a character?

A

ord

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

The term for a program that does its I/O with files is

A

batch

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

How can you slice a string

A

“string”[#:#]
ex- “hello”[-2:]
-“lo”
ex- “hello”[0:2]
-“he”

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