human
Number of ways to pair people | Function to find number of ways to pair people in party.
To store count of number of ways ..
Using the recurrence defined find count for different values of p ..
Driver code"
How can the above be solved in Python?

=====
Give me a code to number of ways to pair people and the other steps required?
assistant
#Here is code to number of ways to pair people and the other steps required.
 def findWays ( p ) :
	dp = [ 0 ] * ( p + 1 )
	dp [ 1 ] = 1
	dp [ 2 ] = 2
	for i in range ( 3 , p + 1 ) :
		dp [ i ] = ( dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ] )
	return dp [ p ]
p = 3
print ( findWays ( p ) )