How can I make multiple directories in Mac OS terminal?
The switch -p allows deep folder creation along a path

mkdir -p  i/like/icecream/too


You don’t need python for this, unless it reminds you of “p” instead of the pattern passed in to create the full path prefix.