To calculate $n!!$ for odd $n$, simply loop over the odd integers up to and including $n$, multiplying them together:
# Calcualate n!! = 1.3.5.7...(n-2)n for odd n
n = 11
dfactorial = 1
for i in range(3, n+1, 2):
dfactorial *= i
print('{:d}!! = {:d}'.format(n, dfactorial))
For even $n$, note that $$ n!! = \prod_{i=1}^{n/2} (2i) = 2^{n/2} (n/2)!, $$ so:
# Calcualate n!! = 2.4.6.8...(n-2)n for even n
import math
n = 10
dfactorial = 2**(n // 2) * math.factorial(n // 2)
print('{:d}!! = {:d}'.format(n, dfactorial))