Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":14654,"date":"2015-05-06T23:46:24","date_gmt":"2015-05-07T04:46:24","guid":{"rendered":"https:\/\/gilrg18.withknown.com\/2015\/mastery25-creation-and-use-of-ranges-in-python"},"modified":"2015-05-06T23:46:24","modified_gmt":"2015-05-07T04:46:24","slug":"mastery25-creation-and-use-of-ranges-in-python","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/mastery25-creation-and-use-of-ranges-in-python\/","title":{"rendered":"#mastery25 Creation and use of ranges in Python"},"content":{"rendered":"
\n

The\u00a0range()<\/tt>\u00a0Function<\/h1>\n

If you do need to iterate over a sequence of numbers, the built-in function\u00a0range()<\/tt>\u00a0comes in handy. It generates lists containing arithmetic progressions, e.g.:<\/p>\n

\u00a0<\/p>\n

\n
\n
>>> range(10)\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n<\/pre>\n<\/dd>\n<\/dl>\n

The given end point is never part of the generated list;\u00a0range(10)<\/tt>\u00a0generates a list of 10 values, exactly the legal indices for items of a sequence of length 10. It is possible to let the range start at another number, or to specify a different increment (even negative):<\/p>\n

\u00a0<\/p>\n

\n
\n
>>> range(5, 10)\n[5, 6, 7, 8, 9]\n>>> range(0, 10, 3)\n[0, 3, 6, 9]\n>>> range(-10, -100, -30)\n[-10, -40, -70]\n<\/pre>\n<\/dd>\n<\/dl>\n

To iterate over the indices of a sequence, combine\u00a0range()<\/tt>\u00a0and\u00a0len()<\/tt>\u00a0as follows:<\/p>\n

\u00a0<\/p>\n

\n
\n
>>> a = ['Mary', 'had', 'a', 'little', 'lamb']\n>>> for i in range(len(a)):\n...     print i, a[i]\n... \n0 Mary\n1 had\n2 a\n3 little\n4 lamb

<\/pre>\n<\/dd>\n<\/dl>\n

My example:<\/p>\n

x=[‘mastery25′,’tc1014’]<\/p>\n

for i in range (len(x)):<\/p>\n

\u00a0 \u00a0 \u00a0print (“#”,x[i])<\/p>\n

>>>#mastery<\/a>25<\/p>\n

>>>#tc<\/a>1014<\/p>\n

#mastery<\/a>25<\/p>\n

#tc<\/a>1014<\/p>\n

GILBERTO ROGEL GARC\u00cdA<\/p>\n

SOURCE:\u00a0Here<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

\n

The range()<\/tt> Function<\/h1>\n

If you do need to iterate over a sequence of numbers, the built-in function range()<\/tt> comes in handy. It generates lists containing arithmetic progressions, e.g.:<\/p>\n

 <\/p>\n

\n
\n
>>> range(10)\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n<\/pre>\n<\/dd>\n<\/dl>\n

The given end point is never part of the generated list; range(10)<\/tt> generates a list of 10 values, exactly the legal indices for items of a sequence of length 10. It is possible to let the range start at another number, or to specify a different increment (even negative):<\/p>\n

 <\/p>\n

\n
\n
>>> range(5, 10)\n[5, 6, 7, 8, 9]\n>>> range(0, 10, 3)\n[0, 3, 6, 9]\n>>> range(-10, -100, -30)\n[-10, -40, -70]\n<\/pre>\n<\/dd>\n<\/dl>\n

To iterate over the indices of a sequence, combine range()<\/tt> and len()<\/tt> as follows:<\/p>\n

 <\/p>\n

\n
\n
>>> a = ['Mary', 'had', 'a', 'little', 'lamb']\n>>> for i in range(len(a)):\n...     print i, a[i]\n... \n0 Mary\n1 had\n2 a\n3 little\n4 lamb

<\/pre>\n<\/dd>\n<\/dl>\n

My example:<\/p>\n

x=[‘mastery25′,’tc1014’]<\/p>\n

for i in range (len(x)):<\/p>\n

     print (“#”,x[i])<\/p>\n

>>>#mastery<\/a>25<\/p>\n

>>>#tc<\/a>1014<\/p>\n

#mastery<\/a>25<\/p>\n

#tc<\/a>1014<\/p>\n

GILBERTO ROGEL GARCÍA<\/p>\n

SOURCE: Here<\/a><\/p>\n<\/div>\n

Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,25],"tags":[209,486,45,287],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/14654"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=14654"}],"version-history":[{"count":5,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/14654\/revisions"}],"predecessor-version":[{"id":17487,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/14654\/revisions\/17487"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=14654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=14654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=14654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}