Well you can't make it work like a simple 20k potentiometer by connecting them end to end, because each wiper will only travel over one half the voltage "potential", if you connect the wiper of P1, to the top of P2, with both pot lows grounded, you will get 2x the taper of a single pot at the wiper of P2.
OTOH you can connect them in series as a 20k variable resistance (rheostat). There are two workable rheostat connections, from low of P1, wiper of P1 connected to low of P2, to output from wiper of P2. or from top of P1, wiper of P2 connected to top of P1, to output from wiper of P1.
The two connections will give minimum R at opposite ends of rotation with roughly 2x the resistance change of single 10k pot connected the same way.
JR