Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/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/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":28157,"date":"2015-11-25T19:59:02","date_gmt":"2015-11-26T01:59:02","guid":{"rendered":"http:\/\/juansalvadorfernandez.wordpress.com\/?p=178"},"modified":"2015-11-25T19:59:02","modified_gmt":"2015-11-26T01:59:02","slug":"creation-and-use-of-tuples-and-lists-in-python","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/creation-and-use-of-tuples-and-lists-in-python\/","title":{"rendered":"Creation and use of Tuples and Lists in Python"},"content":{"rendered":"

Both tuples and lists are bundles of data bound together under a single index. The difference radiates in both the syntax and the fact that the tuple is immutable, and the list can be altered.<\/p>\n

The difference in syntax between a list and a tuple is that to create a list you use \u201c[ ]\u201d and to create a tuple you use \u201c( )\u201d. Plus tuples are defined as \u201cHeterogeneous data structures\u201d and lists are defined as \u201cHomogeneous sequences that have an order\u201d<\/p>\n

The use you most probably will use the tuple as reference data, since the values inside it cannot be modified; the list in the other hand can have the values inside it changed, move around, add new values and eliminate existing ones.<\/p>\n

If you remember the mastery about \u201cFor\u201d loops, in the example we used a list named \u201cL\u201d containing the values [1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 5]. For that program we could use a tuple as well since the \u201cfor\u201d only checks for the value within the list, but it doesn\u2019t modify it.<\/p>\n

There are a whole bunch of things you can do with lists and tuples, like splitting and indexing them, for a whole list of the things you can do and how to do them please visit this link: http:\/\/www.tutorialspoint.com\/python\/python_lists.htm<\/a><\/p>\n

You should be very careful not to use lists instead tuples or the other way around since even if you ARE able to do some things with both without negative results, not all of their functions are the same, tuples are more oriented towards indexing and lists are fore managing data.<\/p>\n

Lists and tuples have positions, or spaces, and they store the values they are given in those. Those positions start with 0, then 1, next 2 and so on till they cover the length they are needed. So if you need the value stored in the tenth position of a list, you would need to call for the ninth value, since the counter starts from zero instead of one.<\/p>\n

Another important thing is that they can contain any amount of data, and they don\u2019t care about dta types, you can just throw integers, floats and strings inside a list and it will be just fine, just be careful when trying to mess around with the information itself, the list doesn\u2019t have a problem with it but other parts of your code may.<\/p>\n

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

Both tuples and lists are bundles of data bound together under a single index. The difference radiates in both the syntax and the fact that the tuple is immutable, and the list can be altered. The difference in syntax between a list and a tuple is that to create a list you use “[ ]” … Continue reading Creation and use of Tuples and Lists in Python<\/span><\/a>\"\"<\/p>\n","protected":false},"author":211,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[901,902,894,801,39],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/28157"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/211"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=28157"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/28157\/revisions"}],"predecessor-version":[{"id":28158,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/28157\/revisions\/28158"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=28157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=28157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=28157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}