We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dce36b1 commit 35896c2Copy full SHA for 35896c2
leetcode/models/graphql_get_question_detail.py
@@ -43,3 +43,7 @@ def content(self):
43
@property
44
def sample_test_case(self):
45
return self._question_data.get('sampleTestCase')
46
+
47
+ @property
48
+ def code_snippet(self, lang: str = 'python3'):
49
+ return list(filter(lambda x: x['langSlug'] == lang, self._question_data.get('codeSnippets')))[0].get('code')
0 commit comments