Java Into String Hackerrank Solution For Python