Computer Science Engineering

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

28 Terms

1
New cards

replace(old, new)

returns copy of string with replacements

2
New cards

replace(old, new, count)

only replaces first count of occurrences

3
New cards

find(x)

returns index of first occurence

4
New cards

find(x, start)

begins at start index

5
New cards

find(x, start, end)

stops at end index

6
New cards

rfind(x)

searches in reverse

7
New cards

count(x)

return number of occurrences

8
New cards

isalnum()

returns True if all characters are letters or numbers 0-9

9
New cards

isdigit()

returns True is all characters are numbers 0-9

10
New cards

islower()

returns True if all characters are lowercased

11
New cards

isupper()

returns True if all characters are uppercase

12
New cards

isspace()

returns True if all characters are whitespace

13
New cards

startswith(x)

returns True if the string starts with x

14
New cards

endswith(x)

returns True if the string end with x

15
New cards

capitalize()

returns copy with first character capitalized and the rest lowercase

16
New cards

lower()

returns all lowercased copy

17
New cards

upper()

returns all uppercased copy

18
New cards

strip()

returns copy with all leading and trailing whitespace removed

19
New cards

title()

returns copy with first final letters of words capitalized

20
New cards

list.appendix(x)

adds items to the end of the list

21
New cards

list.insert(i,x)

inserts element (x) and the specified index (i)

22
New cards

list.remove(x)

removes first occurrences

23
New cards

list.pop(i)

removes item at the index and returns the value

24
New cards

list.sort()

sorts elements of a list in place

25
New cards

list.reverse()

reverses order of elements

26
New cards

list.index(x)

returns index of the first occurrence

27
New cards

list.count(x)

returns number of times x appears

28
New cards

sorted()

sorts existing list that’s inputted
*must be assigned to a variable —> my.lists = sorted(num_list)