Both games have a class that uses a sniper, but TF2 also gives its sniper class a Bow/Arrow, A shield that blocks backstabs, and a jar a pee to throw on one's enemies.
It's going to be a tough call on which one you should pick up. If you want a WWII shooter well f course DoD will be your best bet. If you want a fun cartoony type game will TF2 will be your best bet. If you still cannot decide see if anyone here has a guest pass for the games.