One-line sytaxe to Read and return file on python using with loop : I need to read a file and return resulat: this is the syntaxe I use

    return json.loads(with open(file, 'r') as f: f.read())

I know that we cannot write with open loop in one line, so I look for the correct syntax to fix that