Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________ Name: ______________ Net id: _____________ || Name: ______________ Net id: _____________
Provide your answers to 3-7, creating each word by slicing:
Create your own slicing/word puzzle: what's the word and what is the answer?
max
returns the maximal value of a string as well as a list. What is max("science")
and why?
reversed(sorted([5,4,1,2,8]))
and why?
sorted(lst).index(min(lst))
for any list lst? Why? What's the value if min
is replaced by max
?
st.endswith(st[-3:])
guaranteed to always be true?
st.upper().endswith(st)
true?