cpsc exam three

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

true

the following statement creates an empty: myset = ()

strip

This string method returns a copy of the string with all leading and trailing whitespace characters removed

True

You can use a for loop to iterate over the individual characters in a string

in

You can use the ____ operator to determine whether a key exists in a dictionary

del

You use the ____ statement to delete an element from a dictionary

add

You can add one element to a set with the ____ set

{}

You can use ____ to create an empty dictionary

values

This ___ method returns all a dictionary's values (without their keys) as a dictionary view, which is a type of sequence

^

This operator can be used to find the symmetric difference of two sets

false

A list can be a dictionary key

&

operator can be used to find the intersection of two sets

len

The ____ function returns the length of a string

clear

The ____ deletes all the elements in a dictionary, leaving the dictionary empty

get

The ____ dictionary method returns the value associated with a specific key. If the key is not found it returns a default value.

len

The ____ function returns the number of elements in a set

lstrip

The ____ method returns a copy of the string with all leading whitespace characters removed

popitem

The ____ method returns a randomly selected key-value pair from a dictionary

items

The ____ method returns all of a dictionary's keys and their associated values as a sequence of tuples

keys

The ____ method returns all of a dictionary's keys as a dictionary view, which is a type of sequence

find

The ____ method returns the lowest index in the string whee a specified substring removed

pop

The ____ method returns the value associated with a specified key, and removes that key-value pair from the dictionary

-

The ____ operator can be used to find the difference of two

discard

The ____ set method removes an element but does not raise an exception if the element is not found

o

The first index in a string is ____

False

The isupper method converts a string to all uppercase characters

True

The repetition operator (*) works with strings as well as lists

|

This operator can be used to find the union of two sets

remove

This set method removes an element and raises an exception if the element is not found

alpha

This string method returns true if a string contains only a alphabetic characters and is at least on character in length

isdigit

This string method returns true if a string contains only numeric digits and is at least one character in length

update

You can add one element to a set with this method

false

You can store duplicate elements in a set


Set pelajaran terkait

Session 4: Organizational Culture

View Set

Biology Chapter 5 Study Questions

View Set

Chapter 27. EMT, Chapter 26, Chapter 25, Chapter 24. EMT, EMT

View Set