Diamond with Python and C