All challenges
Multiple ChoiceIntermediate 30s

re.sub Replacement

Choose the best answer for: regex substitution
Options
  1. 1re.sub returns a list of all the matched substrings
  2. 2re.sub(pattern, repl, string) replaces matches
  3. 3re.sub modifies the original string in place
  4. 4re.sub replaces only the first match and stops

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle