{"id":22346,"date":"2023-02-23T06:03:37","date_gmt":"2023-02-23T06:03:37","guid":{"rendered":"https:\/\/www.booksofall.com\/pl\/?post_type=product&#038;p=22346"},"modified":"2023-02-23T06:03:38","modified_gmt":"2023-02-23T06:03:38","slug":"python-2-official-documentation","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/","title":{"rendered":"Python 2 Official Documentation"},"content":{"rendered":"<p>If you do much work on computers, eventually you find that there\u2019s some task you\u2019d like to automate. For example, you may wish to perform a search-and-replace over a large number of text files, or rename and rearrange a bunch of photo files in a complicated way. Perhaps you\u2019d like to write a small custom database, or a specialized <a href=\"https:\/\/docwiki.embarcadero.com\/RADStudio\/Alexandria\/en\/GUI_Applications\">GUI application<\/a>, or a simple game.<\/p>\n<p>If you\u2019re a professional software developer, you may have to work with several <a href=\"https:\/\/en.wikipedia.org\/wiki\/C_(programming_language)\">C<\/a>\/<a href=\"https:\/\/en.wikipedia.org\/wiki\/C%2B%2B\">C++<\/a>\/<a href=\"https:\/\/www.java.com\/zh-TW\/\">Java<\/a> libraries but find the usual write\/compile\/test\/re-compile cycle is too slow. Perhaps you\u2019re writing a test suite for such a library and find writing the testing code a tedious task. Or maybe you\u2019ve written a program that could use an extension language, and you don\u2019t want to design and implement a whole new language for your application.<\/p>\n<p><a href=\"https:\/\/www.python.org\/\">Python<\/a> is just the language for you.<\/p>\n<p>You could write a Unix shell script or Windows batch files for some of these tasks, but shell scripts are best at moving around files and changing text data, not well-suited for GUI applications or games. You could write a C\/C++\/Java program, but it can take a lot of development time to get even a first-draft program. Python is simpler to use, available on Windows, Mac OS X, and Unix operating systems, and will help you get the job done more quickly.<\/p>\n<p>Python is simple to use, but it is a real programming language, offering much more structure and support for large programs than shell scripts or batch files can offer. On the other hand, Python also offers much more error checking than C, and, being a very-high-level language, it has high-level data types built in, such as flexible arrays and dictionaries. Because of its more general data types Python is applicable to a much larger problem domain than Awk or even Perl, yet many things are at least as easy in Python as in those languages.<\/p>\n<p>Python allows you to split your program into modules that can be reused in other Python programs. It comes with a large collection of standard modules that you can use as the basis of your programs \u2014 or as examples to start learning to program in Python. Some of these modules provide things like file <a href=\"https:\/\/en.wikipedia.org\/wiki\/Input\/output\">I\/O<\/a>, system calls, sockets, and even interfaces to graphical user interface toolkits like Tk.<\/p>\n<p>Python is an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Interpreter_(computing)\">interpreted language<\/a>, which can save you considerable time during program development because no compilation and linking is necessary. The interpreter can be used interactively, which makes it easy to experiment with features of the language, to write throw-away programs, or to test functions during bottom-up program development. It is also a handy desk calculator.<\/p>\n<p>Python enables programs to be written compactly and readably. Programs written in Python are typically much shorter than equivalent C, C++, or Java programs, for several reasons:<\/p>\n<p>\u2022 the high-level data types allow you to express complex operations in a single statement;<\/p>\n<p>\u2022 statement grouping is done by indentation instead of beginning and ending brackets;<\/p>\n<p>\u2022 no variable or argument declarations are necessary.<\/p>\n<p>Python is extensible: if you know how to program in C it is easy to add a new built-in function or module to the interpreter, either to perform critical operations at maximum speed, or to link Python programs to libraries that may only be available in binary form (such as a vendor-specific graphics library). Once you are really hooked, you can link the Python interpreter into an application written in C and use it as an extension or command language for that application.<\/p>\n<p>By the way, the language is named after the BBC show \u201cMonty Python\u2019s Flying Circus\u201d and has nothing to do with reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged!<\/p>\n<p>Now that you are all excited about Python, you\u2019ll want to examine it in some more detail. Since the best way to learn a language is to use it, the tutorial invites you to play with the Python interpreter as you read.<\/p>\n<p>In the next chapter, the mechanics of using the interpreter are explained. This is rather mundane information, but essential for trying out the examples shown later.<\/p>\n<p>The rest of the tutorial introduces various features of the Python language and system through examples, beginning with simple expressions, statements and data types, through functions and modules, and finally touching upon advanced concepts like exceptions and user-defined classes.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 700px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/tutorial-19mmqljjad?enforceShowPromotionBar=true&amp;p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":22351,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":""},"product_brand":[],"product_cat":[275],"product_tag":[],"class_list":{"0":"post-22346","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-python","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python 2 Official Documentation - BooksOfAll Polish<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/\" \/>\n<meta property=\"og:locale\" content=\"pl_PL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python 2 Official Documentation - BooksOfAll Polish\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Polish\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-23T06:03:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png\" \/>\n<meta name=\"twitter:label1\" content=\"Szacowany czas czytania\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minuty\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/\",\"url\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/\",\"name\":\"Python 2 Official Documentation - BooksOfAll Polish\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png\",\"datePublished\":\"2023-02-23T06:03:37+00:00\",\"dateModified\":\"2023-02-23T06:03:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#breadcrumb\"},\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png\",\"width\":\"498\",\"height\":\"657\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/pl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/pl\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python 2 Official Documentation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/#website\",\"url\":\"https:\/\/www.booksofall.com\/pl\/\",\"name\":\"BooksOfAll Polish\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/pl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pl-PL\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/#organization\",\"name\":\"BooksOfAll Polish\",\"url\":\"https:\/\/www.booksofall.com\/pl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Polish\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python 2 Official Documentation - BooksOfAll Polish","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/","og_locale":"pl_PL","og_type":"article","og_title":"Python 2 Official Documentation - BooksOfAll Polish","og_url":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/","og_site_name":"BooksOfAll Polish","article_modified_time":"2023-02-23T06:03:38+00:00","og_image":[{"url":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png","twitter_misc":{"Szacowany czas czytania":"4 minuty"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/","url":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/","name":"Python 2 Official Documentation - BooksOfAll Polish","isPartOf":{"@id":"https:\/\/www.booksofall.com\/pl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png","datePublished":"2023-02-23T06:03:37+00:00","dateModified":"2023-02-23T06:03:38+00:00","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#breadcrumb"},"inLanguage":"pl-PL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/"]}]},{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#primaryimage","url":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png","contentUrl":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/02\/img_63f6ffd5a7fd8.png","width":"498","height":"657"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/pl\/python-2-official-documentation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/pl\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/pl\/categories\/"},{"@type":"ListItem","position":3,"name":"Python 2 Official Documentation"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/pl\/#website","url":"https:\/\/www.booksofall.com\/pl\/","name":"BooksOfAll Polish","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/pl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/pl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pl-PL"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/pl\/#organization","name":"BooksOfAll Polish","url":"https:\/\/www.booksofall.com\/pl\/","logo":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Polish"},"image":{"@id":"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product\/22346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/media\/22351"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/media?parent=22346"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product_brand?post=22346"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product_cat?post=22346"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product_tag?post=22346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}