Python Code Using String To Get Ring