updated py file

Added solution for checking the empty string