I already looked into many answers but none helped me. I need a code that if the file does not exist then create and then open for reading and writing. The code is writing but not reading, what is the problem?
>>> `file = open('test.txt', 'w+')`
>>> file.write('this is a test')
14
>>> file.read()
''
>>>