Advertisement
Guest User

Untitled

a guest
Feb 4th, 2021
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # コマンドプロンプトにおいてsysteminfo | clipと入力し
  2. # その出力を貼り付けたファイルsysteminfoデータ.txtが
  3. # このファイルと同一のディレクトリにあるとする
  4.  
  5. with open('./systeminfoデータ.txt', 'r', encoding='UTF-8') as file:
  6. for line in file:
  7. if line[0:2] == 'OS':
  8. print(line, end='')
  9.  
  10. print('ファイルの処理は以上です')
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement