Please Tell the result of this line?


#1

open("output.txt", "w")

what this lines return that we are storing in some variable.


#2

we store the file in a variable, python has a special file data type:

print type(open("output.txt", "w"))

type() gives us the data type


#3

it returns this

<open file 'output.txt', mode 'w' at 0x7fd254191930>

what does it means?


#4

information about the file your opened, which file and mode and so on (and something memory address related)


#5

but it's tye is not cleared yet
please tell me t=what is its type


#6

did you use type() like i showed you? The type is file. Its a data type that hasn't been introduced yet in this course


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.