Potassium permanganate is read by the formula reader. How many pairs does it find? import re; print(len(re.findall(r"([A-Z][a-z]?)(\d*)", "KMnO4")))
import re; print(len(re.findall(r"([A-Z][a-z]?)(\d*)", "KMnO4")))
Log in to join the discussion.
Loading…