1) Which method is used to read file line by line a) read() b) readlines() c) readline() d) line() 2) Select the correct method to write a list of lines to a file a) write(list) b) writelines(list) c) writelist(list) 3) Select all true statements when a file is opened using the with statement a) The with statement simplifies exception handling b) The file is automatically closed after leaving the block, and all the resources that are tied up with the file are released. c) File reading and writing are faster using the with statement. 4) Select the correct mode to open a file for appending as well as reading a) a+ b) ar c) rw d) ar+ 5) Select the correct output of the following code :fp.seek(5, 1) a) Move file pointer five characters ahead from the current position. b) Move file pointer five characters ahead from the beginning of a file. c) Move file pointer five characters behind from the current position. d) Move file pointer five characters behind ahead from the end of a file.
0%
python quiz
共有
共有
共有
Heyarjun51
さんの投稿です
コンテンツの編集
印刷
埋め込み
もっと見る
割り当て
リーダーボード
もっと表示する
表示を少なくする
このリーダーボードは現在非公開です。公開するには
共有
をクリックしてください。
このリーダーボードは、リソースの所有者によって無効にされています。
このリーダーボードは、あなたのオプションがリソースオーナーと異なるため、無効になっています。
オプションを元に戻す
クイズ
は自由形式のテンプレートです。リーダーボード用のスコアは生成されません。
ログインが必要です
表示スタイル
フォント
サブスクリプションが必要です
オプション
テンプレートを切り替える
すべてを表示
アクティビティを再生すると、より多くのフォーマットが表示されます。
オープン結果
リンクをコピー
QRコード
削除
自動保存:
を復元しますか?