Yes
During World War 2, it is reported that over 2,000 variants of Japanese Submarines were used during World War 2. Out of this, it is estimated that 10,000s were likely to be used during WW2.
Wolfpack
326
Underseaboats.U-boats
Both sides, the Allies and the Axis, had submarines when WW2 started.
The British lost 76 submarines during WWII.
52
Underseaboats.U-boats
9
759
Why don't you just Google "World War 1 Submarines?"
They were used extensively throughout the war - from beginning to end.