IT 116: Introduction to Scripting
Answers to Class 27 Ungraded Quiz

  1. Write an expression that evaluates to True if the string "ox" is contained in the string pointed to by the string variable team.
    "ox" in team
  2. Write an expression that evaluates to True if the string "ox" is NOT contained in the string pointed to by the string variable team.
    "ox" not in team
  3. What string method returns a new string with all characters converted to lowercase?
    lower()
  4. What string method returns a new string with all characters converted to uppercase?
    upper()
  5. What string method and argument would you use to remove the linefeed character at the end of a string
    rstrip()
  6. What does strip() do?
    returns a new string with whitespace characters at the beginning and end of the string removed
  7. What string method and argument would you use to create a list from a line in a CSV file?
    split(',')