Why does this code not return the temperature information that I am looking for?

def temperature(): r = requests.get(‘https://api.darksky.net/forecast/b02b5107a2c9c27deaa3bc1876bcee81/1.312914,%20103.780257′) json_object = r.text regexCurrentTemp = re.compile(r'”temperature”:(\d\d.\d\d)’) moTemp = regexCurrentTemp.search(str(json_object)) regexApparentTemp = re.compile(r'”apparentTemperature”:(\d\d.\d\d)’) moApparent = regexApparentTemp.search(str(json_object)) print(‘The current temperature is %s and the apparent temperature is %s’ % (moTemp.group, moApparent.group)) temperature() When I remove the .groups from print(‘The current temperature is %s and the apparent temperature is %s’ % (moTemp.group, moApparent.group)),…

Details