Level 1 : What is the output of the following code?


file1 = open('sample.txt', r)
print(file1.readable())
print(file1.writable())

Author: anusha | Tags: file-handling | 1736+ Python FAQs | Share
polymorphism | format | operators | else-statement | identity-operator | slice | string-iteration | invalid-list | expand-tab | split | global-keyword | syntax | operations | input | pickling-&-unpickling | shallow-copy | list-slicing | command-line-parsing | immutability | sum() | file_handling | zfill-function | python-repl | pep | debugging | string-method | comment | init | multiple-inheritance | operator-overloading | frozenset | raise | operator-and | tuple-unpacking | bitwise-operator | while-and-for-loop | with-statement | zip-function | choice | list | interpreter | asyncio | memory | postfix | recursion | generator | tuple | rollback | class-and-inheritance | lists | random-function | file-handling | list-method | list-comprehension | odd-number | update | boolean-and-non-boolean | generators | escape-operator | print | higher-order-function | collections | functions | descriptors | numeric | design-principle | package-management | complex-number | mutable | virtual-environment | filter-function | string-slicing | data-type | collection | copy | input-function | module | multiprocessing | multithreading | while-else-loop | matrix-list-comprehension | print-statement | global | dictionaries | loop-control | python-django | round | precedence-and-associativity | installation | version-check | center | regular-expression | oop | exception | conditional-statement | matplotlib | syntaxerror | indexing | thread | comparison | parameter | return-statement | basic | asyncio-module | feature | global-variable | keyword | type_conversion | identifier | class | deep-copy | __all__-attribute | exception-handling | version | identity-operator | slicing | round-function | operator-or | library | function-and-scope | loops | list-join | list-operation | magic-method | docstring | dicts | arithmetic-operation | random | complex | __future__ | bitwise-operator | syntax-error | software-design | list-comprehension | list-indexing | binary-operation | swapping | mathematics | recurssion | call | sorted | string-concatenation | staticmethod | data-structure | context-manager | string-formatting | fabs-function | method | nested-loop | heap-memory | datatype | inheritance | precedence | conversion | indentation | max-min | expression | pandas | function | enumerate() | iterable | file | for | string-method | zip | assignment-operator | global-variable | list-vs-tuple | constructor | implementation | class-and-instance-variable | set | sys-module | goto-function | virtual-environment | turtle | touples | iterator | math-copysign | map-function | counter-function | python-module | pseudocode | string-slicing | namedtuple | lambdas | operator | min-max-function | oops | lambda-function | data-structure | string-manipulation | math | encapsulation | decimal | data-type | application | type-conversion | built-in-function | assert | benefit | gil | logical-operation | scientific-notation | data_structure | integer | filter | built-in | variable | classes | name-mangling | comprehension | access-modifier | typeerror | id-function | counter | memory-management | boolean | __init_subclass__ | statement | import-method | destructor | python-history | function-argument | type-conversion | set-operation | mapping-function | sorting | min-function | python_version | decorator | attribute | encoding | class-and-object | async | condition | python | error-handling | exception-handling | error | namespace | floating-point-precision | factorial-function | datetime | functional-programming | control-flow | exponentiation | data-structures | sum-function | binary | regex | range | default-mutable-argument | while-loop | logical-operator | conditional-statement | sys | matrix | generators-in-python | loop | control-flow | lambda | match | arithmetic-expression | mysql | threading | stack | immutable-data-type | bitwise | methods | yield | numpy | append | objects | built-in-function | mathematical-function | operand | def | object-attribute | control-statement | dictionary | file-handling | inherit | string-formatting | compute | logical-operator | int | input-function | static-method | overflow | array | head-and-tail | join | list-mutation | string | syntax-error | formal-and-actual-parameter ...