Beautiful Strings easy challenge solved in python