Chapter 8 - More About Strings
This operator determines whether one string is contained inside another string. A. in B. == C. contains D. is_in
A. in
This string method returns a copy of the string with all leading whitespace characters removed. A. rstrip B. lstrip C. remove D. strip_leading
B. lstrip
This string method returns true if a string contains only numeric digits and is at least one character in length. A. the isnumber method B. the isdigit method C. the digit method D. the numeric method
B. the isdigit method
This string method returns a copy of a string with all the alphabetic letters converted to uppercase. A. to_uppercase() B. upper() C. uppercase() D. case_upper()
B. upper()
This function returns the length of a string. A. lengthof B. length C. len D. size
C. len
This is the first index in a string. A. The size of the string minus 1. B. -1 C. 1 D. 0
D. 0
The statement print('QWERTY'*2) will print _________ on the screen. A. ERTY B. QWERTY C. QW D. QWERTYQWERTY
D. QWERTYQWERTY
In Python, strings are mutable. T/F
False
The in operator can be used to determine whether one string is not contained in another string. T/F
False
The method lower() returns a string with all the characters converted to lowercase. T/F
True