Python Flashcards

(4 cards)

1
Q

Dot . - The Wildcard Character

A

Any character whatsoever except a new line

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

What would be some expected matches of c.t?

A

Cat, cot, cut,

Because the . (dot) matches any single character (except new line) so it finds sequences where ‘c’ and ‘t’ are separated by any character

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

Caret ^
The beginning Anchor

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

. What’s this mean?

A

Look exactly for a period

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