Strings and String Methods 🐍✨

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

6 Terms

1
New cards

len()

→ Returns the number of characters in a string.

2
New cards

find()

→ Returns the index of a character or sequence in a string.

→ Case-sensitive and does not return True/False.

3
New cards

in (operator)

→ Checks if a character or sequence exists in a string and returns True or False.

4
New cards

replace()

→ Replaces part of a string with another value.

5
New cards

Dot Notation

→ Used to access string methods.

Example: name.find("a")

6
New cards

f-string

→ A string prefixed with f that allows variables inside {} to format output easily.