Simplied the code as per python docs examples. Removed extra white spaces.