Oct-08-2023, 12:15 PM
One more,a common and advisable way to open a file.
The basic equivalent code(without enter, exit) for the
Most always be forum that want to create Thread(eg General Coding Help), then
with open("test.txt", encoding='utf-8') as fp: file = fp.read() print(file)So this will always close the file object(
fp
), The basic equivalent code(without enter, exit) for the
with open()
statement would look something like this: f = open("test.txt", encoding='utf-8') try: file = fp.read() finally: fp.close() print(file)
(Oct-07-2023, 11:22 AM)akbarza Wrote: usually, when I enter this forum to see replies to my threads I go to forum>>my discussions. but there is not (I did not have seen until now) any object for creating a new thread there, so I have to go to home>>generall coding help>>post thread for creating a new thread.
is there an object or method in my discussions to create a new thread?
thanks
my discussions
only show your discussions,can not make new Thread from there.Most always be forum that want to create Thread(eg General Coding Help), then
Post Thread
.