Some 24,000 German submariners lost their lives in WW2.
My WW1 figure came from the Wall Street Journal review of the book "Ring of Steel" by Alexander Watson, in the Nov. 22-23 weekend issue.
The book is not specifically about submariners, but rather the war from the Austrian and German perspective. It sounded good.