{"id":12062,"date":"2020-02-20T23:43:17","date_gmt":"2020-02-21T07:43:17","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12062"},"modified":"2023-12-01T02:29:34","modified_gmt":"2023-12-01T10:29:34","slug":"python-for-beginners","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/","title":{"rendered":"Python for Beginners: A Handbook"},"content":{"rendered":"\n<p>Python is a popular object-oriented programming language that we use for a variety of purposes, including software development, data analysis, and backend web development. The language, created by Guido van Rossum in 1991, is easy to use thanks to its readability. The language features thousands of third-party packages giving developers access to numerous additional functions.<\/p>\n\n\n\n<p>Python is a great programming language for everyone to learn, but it features several benefits that make it an excellent choice for beginners. Python uses simple syntax, making it more readable than other languages, which means it&#8217;s easy to start with. Additionally, Python works in a variety of contexts, which means you can build powerful applications shortly after learning the basics.<\/p>\n\n\n\n<p>Developers, corporations, and hobbyists around the world use Python. Large companies such as <a href=\"https:\/\/increment.com\/development\/what-its-like-to-be-a-developer-at\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Slack, DigitalOcean, and Fastly<\/a>, <a href=\"https:\/\/medium.com\/netflix-techblog\/python-at-netflix-bba45dae649e\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Netflix<\/a>, <a href=\"https:\/\/developers.google.com\/edu\/python\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Google<\/a>, and <a href=\"https:\/\/ahal.ca\/blog\/2019\/python-3-at-mozilla\/\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">Mozilla<\/a> all prefer the language, as you can use Python for almost anything!<\/p>\n\n\n\n<p>In this guide, we are going to break down a few of the most useful topics that beginner Python developers should know. We&#8217;ll cover topics such as how to get user input, how to manipulate strings, how to write comments, how to sort data and more. Additionally, we&#8217;ll also explore a few advanced programming concepts that may be useful for you to know, such as how to create queues and how to zip data together.<\/p>\n\n\n\n<p>If you&#8217;re a Python beginner who is looking for a guide into the language, this article is for you! We have also linked to our interactive Python tutorials on each concept, which include source code for the concepts we discuss. Now, let&#8217;s delve into some of the most useful Python functions you should learn.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-substring\"><a href=\"https:\/\/careerkarma.com\/blog\/python-substring\/\">Python Substring<\/a><\/h2>\n\n\n\n<p>When you\u2019re working with a string, you may want to split it up into different parts. For example, you may want to split up a user\u2019s name into two variables: first name and surname. Or you may want to get the last four numbers in a user\u2019s ID.<\/p>\n\n\n\n<p>By using the Python slicing approach, you can retrieve this data. Slicing allows you to get a specific part of a string and create a <code>substring<\/code>. Here\u2019s the syntax to get a substring from a larger string:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ourString = \"This is an example sentence.\"\nourString[startNumber:endNumber]<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-enumerate\"><a href=\"https:\/\/careerkarma.com\/blog\/python-enumerate\/\">Python Enumerate<\/a><\/h2>\n\n\n\n<p>The <code>enumerate()<\/code> Python function allows you to loop through a list of items while keeping track of the index value in a separate variable. This function is useful if you have an array that you want to loop through, and where you want to keep track of the index value of each item. Here is an example of the <code>enumerate()<\/code> function\u2019s Python syntax:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>array_name = ['Item One', 'Item Two', 'Item Three']\nfor index, value in enumerate(array_name):\n\tprint(index, value)<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-input\"><a href=\"https:\/\/careerkarma.com\/blog\/python-input\/\">Python Input<\/a><\/h2>\n\n\n\n<p>Retrieving and processing input from a user is a crucial part of programming. Let\u2019s say you are writing a program that collects a student\u2019s numerical grade on a test and tells them whether they earned an A, B, C, D, or failed the test. You would need to get the user\u2019s grade.<\/p>\n\n\n\n<p>The Python <code>input()<\/code> function allows you to retrieve information through the keyboard, which you can then process in your program. Here is the syntax for retrieving user input in Python 2.x:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>email = raw_input(\"Enter your email address: \")\nprint \"To confirm, is your email address:\", email<\/pre><\/div>\n\n\n\n<p>Here\u2019s the syntax of <code>input()<\/code> in Python 3:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>email = input(\"Enter your email address: \")\nprint(\"To confirm, is your email address:\", email)<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-zip\"><a href=\"https:\/\/careerkarma.com\/blog\/python-zip\/\">Python Zip<\/a><\/h2>\n\n\n\n<p>When you\u2019re working in Python, you may want to create a set of dictionaries from two arrays. For example, you may have three arrays that store a user\u2019s name, their customer ID, and their email address, that you want to merge into one. That\u2019s where the <code>zip()<\/code> function comes in.<\/p>\n\n\n\n<p>Python <code>zip()<\/code> allows you to create a list of tuples which contain elements from the iterable items &#8212; such as a list, set, tuple, or dictionary &#8212; that you have passed into the <code>zip()<\/code> function. Here\u2019s an example of the <code>zip()<\/code> function in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>employee_numbers = [2, 9, 18, 28]\nemployee_names = [\"Candice\", \"Ava\", \"Andrew\", \"Lucas\"]\nzipped_values = list(zip(employee_names, employee_numbers))<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-comment\"><a href=\"https:\/\/careerkarma.com\/blog\/python-comment\/\">Python Comment<\/a><\/h2>\n\n\n\n<p>Comments allow you to take notes on your code that will be ignored by the compiler. There are a couple of reasons why developers write comments. If you\u2019re working on a big program, comments can help you keep track of each operation; comments can help teams ensure that everyone can read each other\u2019s code; if you\u2019re fixing a bug, comments can help you keep track of your thoughts.<\/p>\n\n\n\n<p>In Python, you can write comments using the number sign <code>hashtag<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre># This is a comment<\/pre><\/div>\n\n\n\n<p>You can also use the <code>#<\/code> character to comment out your code if you want it to be skipped by the compiler:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>if numericalGrades[s] &gt;= 60:\nprint(\"test\")\n# print(students[ss], \"passed their test.\")\nelse:\nprint(students[s], \"failed their test.\")<\/pre><\/div>\n\n\n\n<p>This code, for example, skips the line that starts with the hashtag.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-try-except\"><a href=\"https:\/\/careerkarma.com\/blog\/python-try-except\/\">Python Try Except<\/a><\/h2>\n\n\n\n<p>When you\u2019re writing a program, you may want to test a specific block of code to make sure that it works before the rest of your program runs. In Python, you can use try\/except blocks to test your code for problems and handle exceptions and errors gracefully.<\/p>\n\n\n\n<p>Here is the syntax for a try\/except operation:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>try:\n\tprint(ourVariable)\nexcept:\n\tprint('Error returned')<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-psort\"><a href=\"https:\/\/careerkarma.com\/blog\/python-sort\/\">PSort<\/a><\/h2>\n\n\n\n<p>The Python <code>sorted()<\/code> function allows you to sort a list. For example, you can use <code>sorted()<\/code> to sort an array of employee names in ascending order, or a list of orders in descending order of their order IDs. Here\u2019s the syntax for the Python <code>sorted()<\/code> function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>data = [9, 12, 8, 4, 6]\nsortedData = sorted(data)\nprint(sortedData)<\/pre><\/div>\n\n\n\n<p>You can use sort to arrange a list in both ascending or descending order. Or you can use the <code>key<\/code> parameter to specify your own custom sort if you want to run a more advanced sort operation on your list of values.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-queue-and-deque\">Python Queue and Deque<\/h2>\n\n\n\n<p>Queues are a function in Python that allows you to store data in a first-in, first-out order. For example, if you have a product waitlist and want to enable people to order your product in order of when they signed up, you could use a queue.<\/p>\n\n\n\n<p>Here is the syntax for a Python queue:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>from queue import Queue\nwaitlist = Queue()\nwaitlist.put('Erin')\nwaitlist.put('Samantha')<\/pre><\/div>\n\n\n\n<p>This code would create a queue with two values: Erin and Samantha. You can also create a deque, which allows you to create a double-ended queue that is last-in, first-out. The syntax for this is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>from collections import deque\nwaitlist = deque()\nwaitlist.append('Erin')\nwaitlist.append('Samantha')<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-array\"><a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">Python Array<\/a><\/h2>\n\n\n\n<p>Arrays are an essential data type in Python that allows you to store lists of data. For example, you could use an array to store a list of car names, or a list of flavors an ice cream store sells. Arrays are declared like so:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = ['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Rose']<\/pre><\/div>\n\n\n\n<p>You can manipulate arrays in several ways: you can add items, remove items, clear the array, and more. Learn more about Python array functions in our guide on the topic here.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-print-without-newline\"><a href=\"https:\/\/careerkarma.com\/blog\/python-print-without-new-line\/\">Python Print Without Newline<\/a><\/h2>\n\n\n\n<p>When you\u2019re writing a program, you may want to print a value to the console and keep it on the same line as another value. For example, you may wish to an employee\u2019s name, payroll address, and salary to appear on the same line in your program.<\/p>\n\n\n\n<p>The syntax for printing without a new line in Python 3 is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(\"Hello there!\", end = '')\nprint(\"It is a great day.\")<\/pre><\/div>\n\n\n\n<p>Here\u2019s the syntax for printing a statement without a new line in Python 2.x:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print \"Hello there!\",\nprint \"It is a great day.\"<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-reverse-list\"><a href=\"https:\/\/careerkarma.com\/blog\/python-reverse-list\/\">Python Reverse List<\/a><\/h2>\n\n\n\n<p>There may be an occasion where you have a list that you want to flip into reverse order. For example, you may have a list of employee names in alphabetical order that you want to appear in reverse alphabetical order.<\/p>\n\n\n\n<p>There are three ways you can reverse a list in Python:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Slicing<\/li>\n\n\n\n<li>Reverse()<\/li>\n\n\n\n<li>Reversed()<\/li>\n<\/ul>\n\n\n\n<p>You can find out more about how these methods work in our guide on the topic.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-append-to-list\">Python Append to List<\/h2>\n\n\n\n<p>When you\u2019re working with a list, you may want to add items to that list. For instance, you may have a list of toy animals stocked at a store to which you want to add a new animal.<\/p>\n\n\n\n<p>We can use three functions to append an item to a list: <code>append()<\/code>, <code>insert()<\/code>, and <code>extend()<\/code>.<\/p>\n\n\n\n<p><code>Append()<\/code> allows you to add an item to the end of a list. <code>Insert()<\/code> will enable you to add an item at a specific position in a list. <code>Extend()<\/code> allows you to merge two lists into one. Read our guide on these methods for examples on how to use them in practice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-break-and-continue\"><a href=\"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/\">Python Break and Continue<\/a><\/h2>\n\n\n\n<p>We can use a Python <code>break<\/code> statement to stop a loop and continue with the rest of a program, and the <code>continue<\/code> statement works to exit a loop and proceed to the next iteration. Both of these statements are useful if you\u2019re looking to skip certain parts of a loop.<\/p>\n\n\n\n<p>Here\u2019s an example of the break statement in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = [\"Paul\", \"Erin\", \"Connie\", \"Moira\"]\nfor student in range(0, len(students)):\n\tif student == 2:\n\t\tbreak\n\tprint(students[student])\n\tprint(\"Counter is \" + str(student))\nprint(\"Program Complete\")<\/pre><\/div>\n\n\n\n<p>This code will stop our loop when <code>student<\/code> is equal to <code>2<\/code>. In addition, the <code>continue<\/code> statement uses the same syntax as the <code>break<\/code> statement above. Thus, we could replace <code>break<\/code> with <code>continue<\/code> if we just wanted to skip printing a student\u2019s name when <code>student<\/code> is equal to <code>2<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-read-file\"><a href=\"https:\/\/careerkarma.com\/blog\/python-read-file\/\">Python Read File<\/a><\/h2>\n\n\n\n<p>Often, you\u2019ll store data for a Python program in a file, which is useful if you have large sets of data you want to work with, or if you want to save data. To read the contents of a file, there are three Python functions that you can use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>read()<\/code>: Returns the contents of a file<\/li>\n\n\n\n<li><code>readline()<\/code>: Returns the next line of a file<\/li>\n\n\n\n<li><code>readlines()<\/code>: Returns a list of lines in a file<\/li>\n<\/ul>\n\n\n\n<p>Read our full guide on Python read file methods to learn more about how these work, and how you can use them to read the contents of a file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Python is a programming language that works in a variety of ways. You can use Python to create web applications, or to analyze data, or to run a simple program. In this guide, we have broken down a number of the most common Python operations for beginners. We\u2019ve discussed everything from how to create a substring, to how to use an array in Python.<\/p>\n\n\n\n<p>As you embark on your journey to enrolling in a <a href=\"https:\/\/careerkarma.com\/blog\/online-python-courses\/\">Python course online<\/a>, feel free to keep coming back to this handbook and use it as a resource to help guide your next steps. We will update this guide as we write more articles so that it\u2019s easy for you to find the information you need to learn Python as a beginner. After following this guide, you\u2019ll be ready to handle several common operations in Python.<\/p>\n","protected":false},"excerpt":{"rendered":"Python is a popular object-oriented programming language that we use for a variety of purposes, including software development, data analysis, and backend web development. The language, created by Guido van Rossum in 1991, is easy to use thanks to its readability. The language features thousands of third-party packages giving developers access to numerous additional functions.&hellip;","protected":false},"author":240,"featured_media":12064,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[12688],"class_list":{"0":"post-12062","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python","8":"tag-coding-resources"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python for Beginners: A Handbook | Career Karma<\/title>\n<meta name=\"description\" content=\"Learn the basics of Python and the top operations that beginners to the language should know.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python for Beginners: A Handbook\" \/>\n<meta property=\"og:description\" content=\"Learn the basics of Python and the top operations that beginners to the language should know.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-21T07:43:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T10:29:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"668\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python for Beginners: A Handbook\",\"datePublished\":\"2020-02-21T07:43:17+00:00\",\"dateModified\":\"2023-12-01T10:29:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\"},\"wordCount\":1678,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"keywords\":[\"coding resources\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\",\"name\":\"Python for Beginners: A Handbook | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"datePublished\":\"2020-02-21T07:43:17+00:00\",\"dateModified\":\"2023-12-01T10:29:34+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Learn the basics of Python and the top operations that beginners to the language should know.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg\",\"width\":1000,\"height\":668},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/careerkarma.com\/blog\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python for Beginners: A Handbook\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python for Beginners: A Handbook | Career Karma","description":"Learn the basics of Python and the top operations that beginners to the language should know.","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:\/\/careerkarma.com\/blog\/python-for-beginners\/","og_locale":"en_US","og_type":"article","og_title":"Python for Beginners: A Handbook","og_description":"Learn the basics of Python and the top operations that beginners to the language should know.","og_url":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-02-21T07:43:17+00:00","article_modified_time":"2023-12-01T10:29:34+00:00","og_image":[{"width":1000,"height":668,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python for Beginners: A Handbook","datePublished":"2020-02-21T07:43:17+00:00","dateModified":"2023-12-01T10:29:34+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/"},"wordCount":1678,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","keywords":["coding resources"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-for-beginners\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/","url":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/","name":"Python for Beginners: A Handbook | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","datePublished":"2020-02-21T07:43:17+00:00","dateModified":"2023-12-01T10:29:34+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Learn the basics of Python and the top operations that beginners to the language should know.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON.jpg","width":1000,"height":668},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python for Beginners: A Handbook"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=12062"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12062\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12064"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}