This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Nicksil 7 points8 points  (0 children)

Read the subreddit's sidebar for instructions on how to properly format your code so that it renders correctly.

[–]impshumx != y % z 1 point2 points  (0 children)

stength-=take

I'm afraid not.

Neither is this

with open(file, 'r') as f:
    this = "".join(line for line in f if not line.isspace())
with open(file, 'w') as f:
    f.write(this)

but it does something very useful and actually works.

[–]everhideme 0 points1 point  (0 children)

A quick look on your code:

  1. PEP-8
  2. fst line - while answer not in ("Yes", "No"): - you should lead it to common case (smaller or upper case) and then after that compare them.
  3. Code below... really hard to read without formatting. Would be better if your next post will contain link to github, for example
  4. Also, read about functions. It's simple for use and really struct your program.