Add solutions in Python
Update ruby code