The joke is a pun. To say something 'wistfully' means to say it with a feeling of vague or regretful longing.  The word sound of the word 'whist' is in the first part of 'wistfully' and it is the name of a type of card game.
I ' d like to learn a new card game , Tom said wistfully .