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