0
it is written than readlines is a function still it is used with dot(.)operator like a method. why?
2 Respuestas
+ 2
Method is function of class.
+ 2
ok @Khurshid dot operator is used to access a method under a class, now readline is a method like read() close() write() defined only under file class. so an object of file class can access these methods.