You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fixtures/codesamples.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,13 +33,13 @@
33
33
"model": "codesamples.codesample",
34
34
"fields": {
35
35
"copy_markup_type": "html",
36
-
"code": "<pre><code><span class=\"comment\"># List comprehensions</span>\r\n>>> fruits = ['Banana', 'Apple', 'Strawberry']\r\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\r\n>>> print(loud_fruits)\r\n<span class=\"output\">['BANANA', 'APPLE', 'STRAWBERRY']</span>\r\n\r\n<span class=\"comment\"># List and the enumerate function</span>\r\n>>> list(enumerate(fruits))\r\n<span class=\"output\">[(0, 'Banana'), (1, 'Apple'), (2, 'Strawberry')]</span></code></pre>",
36
+
"code": "<pre><code><span class=\"comment\"># List comprehensions</span>\r\n>>> fruits = ['Banana', 'Apple', 'Lime']\r\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\r\n>>> print(loud_fruits)\r\n<span class=\"output\">['BANANA', 'APPLE', 'LIME']</span>\r\n\r\n<span class=\"comment\"># List and the enumerate function</span>\r\n>>> list(enumerate(fruits))\r\n<span class=\"output\">[(0, 'Banana'), (1, 'Apple'), (2, 'Lime')]</span></code></pre>",
37
37
"_copy_rendered": "<h1>Compound Data Types</h1>\r\n <p>Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. <a href=\"http://docs.python.org/3.3/tutorial/introduction.html#lists\">More about lists</a></p>",
38
38
"is_published": true,
39
39
"copy": "<h1>Compound Data Types</h1>\r\n <p>Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. <a href=\"http://docs.python.org/3.3/tutorial/introduction.html#lists\">More about lists</a></p>",
40
40
"updated": "2014-02-20T18:06:09.903Z",
41
41
"created": "2014-02-20T18:06:09.903Z",
42
-
"_code_rendered": "<pre><code><span class=\"comment\"># List comprehensions</span>\r\n>>> fruits = ['Banana', 'Apple', 'Strawberry']\r\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\r\n>>> print(loud_fruits)\r\n<span class=\"output\">['BANANA', 'APPLE', 'STRAWBERRY']</span>\r\n\r\n<span class=\"comment\"># List and the enumerate function</span>\r\n>>> list(enumerate(fruits))\r\n<span class=\"output\">[(0, 'Banana'), (1, 'Apple'), (2, 'Strawberry')]</span></code></pre>",
42
+
"_code_rendered": "<pre><code><span class=\"comment\"># List comprehensions</span>\r\n>>> fruits = ['Banana', 'Apple', 'Lime']\r\n>>> loud_fruits = [fruit.upper() for fruit in fruits]\r\n>>> print(loud_fruits)\r\n<span class=\"output\">['BANANA', 'APPLE', 'LIME']</span>\r\n\r\n<span class=\"comment\"># List and the enumerate function</span>\r\n>>> list(enumerate(fruits))\r\n<span class=\"output\">[(0, 'Banana'), (1, 'Apple'), (2, 'Lime')]</span></code></pre>",
<p>Python source code and installers are available for download for all versions! Not sure which version to use? <ahref="https://wiki.python.org/moin/Python2orPython3">Check here</a>.</p>
0 commit comments