Create 4.py

Not much to describe, simple recursion and nested iteration.