Create bubble.py

This has some bugs which need fixing.