Minimum printer operations

Write codeHard35 min

Your task

A printer can, in one operation, print a contiguous run of a single character, overwriting whatever was there. Given a target string s, return the minimum number of print operations needed to produce s starting from an empty (blank) canvas of the same length. 1 <= len(s) <= 100, s consists of lowercase letters.

Examples

strange_printer(s: str) -> int
Example 1
Inputstrange_printer("aaabbb")
Output2