{"id":175932,"date":"2024-01-06T19:01:34","date_gmt":"2024-01-06T18:01:34","guid":{"rendered":"https:\/\/liora.io\/en\/?p=175932"},"modified":"2026-02-06T08:38:39","modified_gmt":"2026-02-06T07:38:39","slug":"python-programming-for-dummies-episode-1","status":"publish","type":"post","link":"https:\/\/liora.io\/en\/python-programming-for-dummies-episode-1","title":{"rendered":"Python programming for dummies &#8211; Episode 1"},"content":{"rendered":"<h2>Table of Contents:<\/h2>\n<ol>\n    <li><a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/programmer-en-python\">Episode 1<\/a>\n        <ol>\n            <li><a style=\"color: #6e4ceb;\" href=\"\/#introductionpython\">Introduction<\/a><\/li>\n            <li><a style=\"color: #6e4ceb;\" href=\"\/#variables\">Variables<\/a><\/li>\n            <li><a style=\"color: #6e4ceb;\" href=\"\/#types\">Types<\/a><\/li>\n        <\/ol>\n    <\/li>\n    <li><a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/programmation-python-fonctions-operateurs-boucles\" target=\"_blank\" rel=\"noopener\">Episode 2<\/a>\n        &#8211;<a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/programmation-python-fonctions-operateurs-boucles#operateurs\" target=\"_blank\" rel=\"noopener\">Operators<\/a>&#8211;\n            <a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/programmation-python-fonctions-operateurs-boucles#boucles\" target=\"_blank\" rel=\"noopener\">Loops<\/a>&#8211;\n            <a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/programmation-python-fonctions-operateurs-boucles#fonctions\" target=\"_blank\" rel=\"noopener\">Functions<\/a>\n    <\/li>\n    <li><a style=\"color: #000000;\" href=\"https:\/\/liora.io\/data-cleaning\" target=\"_blank\" rel=\"noopener\">Episode 3<\/a> &#8211;\n            <a style=\"color: #000000;\" href=\"https:\/\/liora.io\/data-cleaning#importdesdonnees\" target=\"_blank\" rel=\"noopener\"> Data Import<\/a> &#8211;\n            <a style=\"color: #000000;\" href=\"https:\/\/liora.io\/data-cleaning#datacleaning\" target=\"_blank\" rel=\"noopener\">Data Cleaning<\/a> &#8211;\n             <a style=\"color: #000000;\" href=\"https:\/\/liora.io\/data-cleaning#dataprocessing\" target=\"_blank\" rel=\"noopener\">Data Processing<\/a><u style=\"color: #000000;\"><\/u>\n    <\/li>\n    <li><u style=\"color: #000000;\"><a style=\"color: #000000;\" href=\"https:\/\/liora.io\/la-programmation-python-pour-les-nuls-episode-4\">Episode 4 <\/a><\/u> &#8211;<a style=\"color: #000000;\" href=\"https:\/\/liora.io\/exemple-programme-python#bibliothequepython\">Python Library Import &#8211;<\/a><a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/exemple-programme-python#donneespython\">Data Import<\/a> &#8211;<a style=\"color: #000000;\" href=\"https:\/\/liora.io\/exemple-programme-python#valeursmanquantes\">Handling Missing Values <\/a><\/li>\n    <li><a style=\"color: #000000; text-decoration: underline;\" href=\"https:\/\/liora.io\/la-programmation-python-pour-les-nuls-episode-4#cheatsheet\">Python Cheat Sheet<\/a><\/li>\n<\/ol>\n\t\t\t<h2>Are you interested in programming? Would you like to learn the basics of a commonly used programming language in an intuitive way? Then you&#8217;ve come to the right place! After reading this, you&#8217;ll know all the basics of programming in Python! From variables and functions to loops, Python&#8217;s tools will hold no secrets for you. <\/h2>\t\t\n\t\t\t<h3>The python story<\/h3>\t\t\n\t\t<p>Unlike other languages, <a href=\"https:\/\/liora.io\/en\/avoid-these-top-5-common-python-coding-mistakes\">Python is designed to be much more concise and expressive,<\/a> requiring less time, effort and lines of code to perform the same operations.<\/p><p>The language is highly appreciated for its simpler approach to programming basics. It continued to evolve over the years, until December 2008. That year, a cleaner, more modern version of the language was released: version 3.0. This has been the only supported version since January 2020.<\/p><p>Today, <a href=\"https:\/\/liora.io\/en\/python-tutorial-reasons-and-strategies-for-learning-the-language\">Python has over 8.4 million users worldwide<\/a>, making it the second most widely used language behind Javascript.<\/p><p>&nbsp;<\/p><p>?Related articles:<\/p><table dir=\"ltr\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" data-sheets-root=\"1\"><colgroup><col width=\"656\"><\/colgroup><tbody><tr><td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Folium: Discover the open source Python library &quot;}\" data-sheets-hyperlink=\"https:\/\/liora.io\/en\/folium-discover-the-open-source-python-library\"><a href=\"https:\/\/liora.io\/en\/folium-discover-the-open-source-python-library\" target=\"_blank\" rel=\"noopener\">Folium: Discover the open source Python library <\/a><\/td><\/tr><tr><td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Matplotlib: Master Data Visualization in Python &quot;}\" data-sheets-hyperlink=\"https:\/\/liora.io\/en\/matplotlib-master-data-visualization-in-python\"><a href=\"https:\/\/liora.io\/en\/matplotlib-master-data-visualization-in-python\" target=\"_blank\" rel=\"noopener\">Matplotlib: Master Data Visualization in Python <\/a><\/td><\/tr><tr><td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Python Crash Course: Get started &quot;}\" data-sheets-hyperlink=\"https:\/\/liora.io\/en\/python-all-you-need-to-know\"><a href=\"https:\/\/liora.io\/en\/python-all-you-need-to-know\" target=\"_blank\" rel=\"noopener\">Python Crash Course: Get started <\/a><\/td><\/tr><tr><td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Mastering Machine Learning in Python: Data-Driven Success &quot;}\" data-sheets-hyperlink=\"https:\/\/liora.io\/en\/machine-learning-python-where-to-start\"><a href=\"https:\/\/liora.io\/en\/machine-learning-python-where-to-start\" target=\"_blank\" rel=\"noopener\">Mastering Machine Learning in Python: Data-Driven Success <\/a><\/td><\/tr><tr><td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Python Programming for Beginners - Episode 3&quot;}\" data-sheets-hyperlink=\"https:\/\/liora.io\/en\/python-programming-for-beginners-episode-3\"><a href=\"https:\/\/liora.io\/en\/python-programming-for-beginners-episode-3\" target=\"_blank\" rel=\"noopener\">Python Programming for Beginners &#8211; Episode 3<\/a><\/td><\/tr><tr><td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Django: All about the Python web development framework&quot;}\" data-sheets-hyperlink=\"https:\/\/liora.io\/en\/django-all-about-the-python-web-development-framework\"><a href=\"https:\/\/liora.io\/en\/django-all-about-the-python-web-development-framework\" target=\"_blank\" rel=\"noopener\">Django: All about the Python web development framework<\/a><\/td><\/tr><\/tbody><\/table>\t\t\n\t\t\t<h3>Why learn Python programming?<\/h3>\t\t\n\t\t<p>Python offers many advantages:<\/p><ul><li><strong>Extensive libraries:<\/strong> a large collection of classical numerical methods, plotting and data processing tools.<\/li><li>These<strong> avoid the need to reprogram complex<\/strong> or tedious elements, such as curve plotting, Fourier transforms or fitting algorithms.<\/li><li><strong>Easy to learn<\/strong>: Python&#8217;s syntax is straightforward and the code is easy to read. For example, you can learn to draw curves in just a few minutes.<\/li><li><strong>Efficiency:<\/strong> Python numerical modules are computationally efficient. But it goes without saying that very fast code becomes useless if you spend too much time writing it. Python aims for fast development and execution times.<\/li><\/ul>\t\t\n\t\t\t\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center\"><div class=\"wp-block-button \"><a class=\"wp-block-button__link wp-element-button \" href=\"\/en\/courses\/data-ai\/\">Learn to program in Python<\/a><\/div><\/div>\n\n\t\t\t<h3>The most popular data-science libraries to learn Python programming<\/h3>\t\t\n\t\t<p>One of <strong>Python&#8217;s major assets<\/strong> is the number and diversity of available libraries. Many are used for Data Science <br>Among them, the most popular are<\/p><ul><li>The <a href=\"https:\/\/liora.io\/en\/pandas-the-python-library\">Pandas library<\/a>, dedicated to working with data tables, also known as &#8220;dataframes&#8221;. It enables both data manipulation and analysis.<\/li><li>The <a href=\"https:\/\/liora.io\/en\/numpy-the-python-library-in-data-science\">Numpy library<\/a>, dedicated to numerical calculation. It facilitates the manipulation of numerical tables, notably by enabling the application of various calculation functions.<\/li><li>The <a href=\"https:\/\/liora.io\/en\/scikit-learn-discover-the-python-library-dedicated-to-machine-learning\">Scikit-learn library<\/a>, dedicated to machine learning. Among other things, it can be used to implement methods for data preparation and modeling.<\/li><li>The <a href=\"https:\/\/liora.io\/en\/tensorflow-course-where-to-learn-how-to-use-the-framework\">Tensorflow library<\/a> is dedicated to machine learning and, more specifically, Deep Learning. It was created in open source by Google&#8217;s Artificial Intelligence team.<\/li><\/ul>\t\t\n\t\t\t\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center\"><div class=\"wp-block-button \"><a class=\"wp-block-button__link wp-element-button \" href=\"\/en\/courses\/data-ai\/\">Getting started in Python<\/a><\/div><\/div>\n\n\t\t<p><em>Let&#8217;s get down to business!<\/em><\/p><p>Let&#8217;s start by learning about the different types of variables in Python. This is just the beginning, but in a <a href=\"https:\/\/liora.io\/en\/python-all-you-need-to-know\">few weeks you&#8217;ll have all the basics for programming in Python.<\/a><\/p>\t\t\n\t\t\t<h4>Variables<\/h4>\t\t\n\t\t<p>A variable is used to <a href=\"https:\/\/liora.io\/en\/scrapy-everything-you-need-to-know-about-this-python-web-scraping-tool\">store data that will be used by the program.<\/a> It can store a number, a string, a Boolean, a list or any other type of data.<\/p><p>Each variable has a name, and the equal sign = is used to assign a value to a variable. After initial assignment, the value of a variable can be updated to new values as required.<\/p>\t\t\n\t\t\t<h2>Base types<\/h2>\t\t\n\t\t<p>We&#8217;ll now take a look at the data types used in Python.<\/p>\t\t\n\t\t\t<h4>Numeric types<\/h4>\t\t\n\t\t<p><a href=\"https:\/\/liora.io\/en\/folium-discover-the-open-source-python-library\">Python<\/a> supports both integers and floating-point numbers. There is no type declaration to distinguish them; Python distinguishes them by the presence or absence of a decimal point.<\/p>\t\t\n\t\t\t<h4>Strings:<\/h4>\t\t\n\t\t<p>To store textual data, we use character strings, which can be instantiated using different syntaxes. (single, double or triple quotation marks).<\/p><p>A chain is an immutable object, and its contents cannot be modified. However, new chains can be created from the original chain.<\/p>\t\t\n\t\t\t<h4>Booleans:<\/h4>\t\t\n\t\t<p>Booleans are the result of logical operations and have two possible values: True or False.<\/p><p>Here&#8217;s a list of operations that apply to Booleans:<\/p>\t\t\n\t\t\t<h4>Containers:<\/h4>\t\t\n\t\t<p><a href=\"https:\/\/liora.io\/en\/machine-learning-python-where-to-start\">Python<\/a> provides a number of efficient container types in which collections of objects can be stored.<br>We&#8217;re going to look at the main containers: lists, tuples, sets and dictionaries (but there are many more&#8230;).<\/p>\t\t\n\t\t\t<h6>1- Listes:<\/h6>\t\t\n\t\t<p>A list is an ordered collection of objects. These objects can be of different types.<\/p>\t\t\n\t\t\t<h6>2- Tuple:<\/h6>\t\t\n\t\t<p>Tuples are immutable lists.<\/p>\t\t\n\t\t\t<h6>3- Set:<\/h6>\t\t\n\t\t<p>A set is an unordered container of unique elements.<\/p>\t\t\n\t\t\t<h6>4- Dictionary:<\/h6>\t\t\n\t\t<p>A dictionary is in fact an efficient array that maps keys to values. It is the most important container in Python.<\/p>\t\t\n\t\t\t<h3>Important notes\n<\/h3>\t\t\n\t\t<ul><li style=\"font-weight: 400;\">Keys can be of different types<\/li><li style=\"font-weight: 400;\">A key must be immutable<\/li><\/ul>\t\t\n\t\t\t<h3>Operations managed by dictionaries:\n<\/h3>\t\t\n\t\t\t<h3>Conclusion<\/h3>\t\t\n\t\t<p>So, in this first article, we&#8217;ve looked at the basics of Python programming, through the instantiation and use of variables of various types and the basic operations that can be performed on them.<\/p><p>See you next week for a new section on instructions. We&#8217;ll also look at functions and how to load a dataset! In the meantime, if the wait is unbearable, our <a href=\"\/en\/courses\/data-ai\/data-analyst\">Data Analyst,<\/a> <a href=\"\/en\/courses\/data-ai\/data-scientist\">Data Scientist<\/a> and <a href=\"\/en\/courses\/data-ai\/data-engineer\">Data Engineer<\/a> courses are the perfect place to start and deepen your Data Science learning!<\/p>\t\t\n\t\t\t\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center\"><div class=\"wp-block-button \"><a class=\"wp-block-button__link wp-element-button \" href=\"\/en\/courses\/data-ai\/\">Discover our training courses<\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Table of Contents: Episode 1 Introduction Variables Types Episode 2 &#8211;Operators&#8211; Loops&#8211; Functions Episode 3 &#8211; Data Import &#8211; Data Cleaning &#8211; Data Processing Episode 4 &#8211;Python Library Import &#8211;Data Import &#8211;Handling Missing Values Python Cheat Sheet Are you interested in programming? Would you like to learn the basics of a commonly used programming language [&hellip;]<\/p>\n","protected":false},"author":76,"featured_media":175933,"comment_status":"open","ping_status":"open","sticky":false,"template":"elementor_theme","format":"standard","meta":{"_acf_changed":false,"editor_notices":[],"footnotes":""},"categories":[2434],"class_list":["post-175932","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-dev"],"acf":[],"_links":{"self":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/175932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/users\/76"}],"replies":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/comments?post=175932"}],"version-history":[{"count":1,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/175932\/revisions"}],"predecessor-version":[{"id":206143,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/175932\/revisions\/206143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media\/175933"}],"wp:attachment":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media?parent=175932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/categories?post=175932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}