filename = fileobject.read()
i want to transfer/assign the whole data of a object within a file
filename = fileobject.read()
i want to transfer/assign the whole data of a object within a file
You are almost doing it correctly already; the code should read
filecontent = fileobject.read()
read() with no arguments will read the whole data, i.e. the whole file content. The file name has nothing to do with that.