D335 Introduction to Programming in
Python Test Quizzes with Answers Verified
100% Correct
Check if string contains any numeric characters, including digits, vulgar fractions, subscripts,
superscripts, Roman numerals, and currency numerators.
"⅓".isnumeric()
Remove/replace a letter/character in a string
"ab3".replace("3", "c") => "abc"
Remove a value from a list
[1, 2, 3].remove(1) => [2, 3]
Add to list at a specified index
[2, 3].insert(0, 1) => [1, 2, 3]
Left Justify a String
"abc".ljust(5)
Right Justify a String
"abc".rjust(5)
Center Justify a String
"abc".center(5)
Justify with non-default (space) filler character
Python Test Quizzes with Answers Verified
100% Correct
Check if string contains any numeric characters, including digits, vulgar fractions, subscripts,
superscripts, Roman numerals, and currency numerators.
"⅓".isnumeric()
Remove/replace a letter/character in a string
"ab3".replace("3", "c") => "abc"
Remove a value from a list
[1, 2, 3].remove(1) => [2, 3]
Add to list at a specified index
[2, 3].insert(0, 1) => [1, 2, 3]
Left Justify a String
"abc".ljust(5)
Right Justify a String
"abc".rjust(5)
Center Justify a String
"abc".center(5)
Justify with non-default (space) filler character