Advertisement
VisualPaul

A1 - Дз 1

Oct 5th, 2014
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import tokenize
  2.  
  3. with open('input.txt', 'rb') as input_file, \
  4.      open('output.txt', 'w') as output_file:
  5.     for (ttype, tstring, *_) in tokenize.tokenize(input_file.readline):
  6.         if ttype == tokenize.COMMENT:
  7.             print(tstring, file=output_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement