{"id":7049,"date":"2014-05-17T05:07:15","date_gmt":"2014-05-16T19:07:15","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7049"},"modified":"2014-05-17T05:07:15","modified_gmt":"2014-05-16T19:07:15","slug":"python-list-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/python-list-primer-tutorial\/","title":{"rendered":"Python List Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Python\/List\/Python_Listwork.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Python List Primer Tutorial ... http:\/\/www.python.org\/\" src=\"http:\/\/www.rjmprogramming.com.au\/Python\/List\/Python_Listwork.jpg\" title=\"Python List Primer Tutorial ... http:\/\/www.python.org\/\"  \/><\/a><p class=\"wp-caption-text\">Python List Primer Tutorial ... http:\/\/www.python.org\/<\/p><\/div>\n<p>In this tutorial we examine some functionality code snippets suiting Python list data structure, in response to, really, and extending, a Yahoo Answers <a target=_blank title='Yahoo Answers question ... thanks' href='https:\/\/au.answers.yahoo.com\/question\/index?qid=20140328234644AAGorRn'>question<\/a>.   Lists, like tuples, are interesting in that different base data types that can&#8217;t cohabit an array can be part of a list, or tuple.   This tutorial builds on the <a title='Python Primer Tutorial' href='#pptbelow'>Python Primer Tutorial<\/a> of previous times, presented below.  Let&#8217;s see immediately below what Wikipedia says about the very interesting Python programming language.<\/p>\n<blockquote><p>Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs.<\/p><\/blockquote>\n<p>In this primer  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/Python\/List\/Python_Listwork.jpg'>tutorial<\/a> you can see some list usage in Python for a Linux Bash session via the Mac laptop application Terminal.<\/p>\n<p>Here is another Python tutorial called <a target=_blank title='Python tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1687'>Python Processing Directory Filespec Primer Tutorial<\/a>.<\/p>\n<p>Link to downloadable Python programming source code which can be renamed to <a target=_blank title='listwork.py' href='http:\/\/www.rjmprogramming.com.au\/Python\/List\/listwork.py_GETME'>listwork.py<\/a> here.<\/p>\n<p>Want to see it as a live run?   This is more problematic with cgi-bin default language of Perl and server-side language of PHP, as at our web server.   However there is a way to redirect the output of a PHP <i><a target=_blank href='http:\/\/au1.php.net\/function.exec' title='PHP exec command'>exec<\/a><\/i> call of the Python into some HTML and show that (easiest in the root directory of the website), and then this (kind of awkward (&#8230; but would be pretty easy to make it less awkward)) <a target=_blank title='listwork.php' href='http:\/\/www.rjmprogramming.com.au\/listwork.php'>live run<\/a> is possible.   The programming PHP source code for this is <a target=_blank title='listwork.php' href='http:\/\/www.rjmprogramming.com.au\/listwork.php_GETME'>listwork.php<\/a> here.   The Three P&#8217;s ride again (Perl is sick today, so rides as a hologram)!   But she&#8217;s a gem (chortle, chortle).<\/p>\n<p>Link to Python website &#8230; <a target=_blank href='http:\/\/www.python.org\/' title='Home of Python'>Home of Python &#8230; where quote up the top resides<\/a><br \/>\nLink to a very useful Python tuple tutorial which helped with this tutorial, so, thanks &#8230; <a target=_blank href='http:\/\/docs.python.org\/release\/1.5.1p1\/tut\/tuples.html' title='Useful Python tuple tutorial'>Useful Python tuple tutorial<\/a><br \/>\nLink to Python jobs done &#8230; <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/Python\/' title='Python example usage'>Python jobs done<\/a> &#8230; personal experience<br \/>\nAnd yes, it&#8217;s true &#8230; the language name is a fond reference to <a target=_blank title='Monty Python' href='http:\/\/www.youtube.com\/watch?v=T70-HTlKRXo'>Monty Python<\/a><br \/>\n<!--\/p--><\/p>\n<hr \/>\n<p id=\"pptbelow\">Previous <a target=_blank title='Python Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=673'>Python Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Python\/Examples\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Python Primer Tutorial ... http:\/\/www.python.org\/\" src=\"http:\/\/www.rjmprogramming.com.au\/Python\/Python_TclTk_HangMan.JPG\" title=\"Python Primer Tutorial ... http:\/\/www.python.org\/\"  \/><\/a><p class=\"wp-caption-text\">Python Primer Tutorial ... http:\/\/www.python.org\/<\/p><\/div>\n<p>Have you heard of Python?<\/p>\n<blockquote><p>Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs.<\/p><\/blockquote>\n<p>Have used it for <a target=_blank title='Python Tkinter GUI' href='http:\/\/docs.activestate.com\/activepython\/2.6\/python\/library\/tkinter.html'>Games Programming<\/a> and it is great at <a target=_blank title='Python and the SAX API parsing XML' href='http:\/\/mail.python.org\/pipermail\/python-dev\/2000-October\/009946.html'>parsing XML via the SAX API<\/a>.<\/p>\n<p>Python has some really interesting data structures such as tuples, lists, sets, dictionaries for instance &#8230; read more <a target=_blank title='Python data types' href='http:\/\/zetcode.com\/lang\/python\/datatypes\/'>here<\/a>.<\/p>\n<p>In this primer  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/Python\/Examples\/'>tutorial<\/a> you can see some snapshots showing examples of use.<\/p>\n<p>Here is another Python tutorial called <a target=_blank title='Python tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1687'>Python Processing Directory Filespec Primer Tutorial<\/a>.<\/p>\n<p>Link to Python website &#8230; <a target=_blank href='http:\/\/www.python.org\/' title='Home of Python'>Home of Python &#8230; where quote up the top resides<\/a><br \/>\nLink to Python jobs done &#8230; <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/Python\/' title='Python example usage'>Python jobs done<\/a> &#8230; personal experience<br \/>\nAnd yes, it&#8217;s true &#8230; the language name is a fond reference to <a target=_blank title='Monty Python' href='http:\/\/www.youtube.com\/watch?v=T70-HTlKRXo'>Monty Python<\/a>\n<\/p>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d7049' onclick='var dv=document.getElementById(\"d7049\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Python\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7049' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we examine some functionality code snippets suiting Python list data structure, in response to, really, and extending, a Yahoo Answers question. Lists, like tuples, are interesting in that different base data types that can&#8217;t cohabit an array &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/python-list-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[196,564,710,932,997,1012,1267,1304,1319],"class_list":["post-7049","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-cgi","tag-hierarchy","tag-list","tag-php","tag-programming","tag-python","tag-the-three-ps","tag-tree","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7049"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=7049"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7049\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=7049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=7049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=7049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}