python script on strings concept