Finished Java vs. Python example