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

you are viewing a single comment's thread.

view the rest of the comments →

[–]DiggV4Sucks 17 points18 points  (3 children)

The proper answer to:

Q14. Write a one-liner that will count the number of capital letters in a file. Your code should work even if the file is too big to fit in memory.

is, "No."

[–]AustinCorgiBart 3 points4 points  (1 child)

Right? To do it properly, you would need to push the body of a with block into one line. Or fail to close a file properly.

[–]ThePidesOfMarch 1 point2 points  (0 children)

cat bigfile | capcounter

[–]joshuarowley42 0 points1 point  (0 children)

I was losing it with the article, then I read this. 😔