The Real Python Podcast

What Can You Do With Python and Counting Objects Using "Counter"


Listen Later

How is Python being used today, and what can you do with the language? Do you want to develop software, dive into data science and math, automate parts of your job and digital life, or work with electronics? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.

We talk about a Real Python article that covers the incredible variety of ways you can use Python. David shares an article about the pythonic way to count objects using the Counter class from the collections module. We discuss the ways it can lead to cleaner and more efficient code.

We cover several other articles and projects from the Python community including, the inaugural CPython developer-in-residence, typeclasses in Python, GitHub Copilot writes a text-based game, friendlier tracebacks in REPLs (including Jupyter), 120+ interactive interview challenges, a module that helps you build complex pipelines of batch jobs, and a tool for plotting in the terminal.

Course Spotlight: Understanding Python List Comprehensions

Python list comprehensions make it easy to create lists while performing sophisticated filtering, mapping, and conditional logic on their members. In this course, you’ll learn when to use a list comprehension in Python and how to create them effectively.

Topics:

  • 00:00:00 – Introduction
  • 00:02:01 – Łukasz Langa Is the Inaugural CPython Developer-in-Residence
  • 00:05:03 – What Can I Do With Python?
  • 00:11:19 – Typeclasses in Python
  • 00:17:59 – Sponsor: Sentry
  • 00:19:01 – Copilot Writes a Text-Based Game in Python
  • 00:27:31 – Python’s Counter: The Pythonic Way to Count Objects
  • 00:34:14 – interactive-coding-challenges: 120+ Interactive Python Coding Interview Challenges With Anki Flashcards
  • 00:38:11 – Video Course Spotlight
  • 00:39:11 – Friendlier Tracebacks in REPLs (Including Jupyter)
  • 00:49:37 – luigi: Python Module That Helps You Build Complex Pipelines of Batch Jobs
  • 00:52:13 – plotext: Plotting in the Terminal
  • 00:55:24 – Thanks and goodbye
  • Show Links:

    Łukasz Langa Is the Inaugural CPython Developer-in-Residence

    What Can I Do With Python? – You’ve finished a course or finally made it to the end of a book that teaches you the basics of programming with Python. You’ve learned about variables, lists, tuples, dictionaries, for and while loops, conditional statements, object-oriented concepts, and more. So, what’s next? What can you do with Python nowadays?

    Typeclasses in Python – Sometimes you need to change the behavior of a function based on the type of argument passed to it. This is a classic example of polymorphism in programming. In this article, you’ll learn how this is typically done in Python, compare that to polymorphism in other languages, and see how the new classes library can make the whole process easier.

    Copilot Writes a Text-Based Game in Python – GitHub’s new Copilot feature has a lot of people talking. The project’s goal is to be an AI pair programmer — a tool that can suggest entire lines of code or even entire functions! In this amusing article, one developer who gained access to Copilot’s technical preview shares how the AI wrote an entire text-based adventure game that turned out to be the solution to an exercise from a Python instructional book.

    Python’s Counter: The Pythonic Way to Count Objects– In this step-by-step tutorial, you’ll learn how to use Python’s Counter to count several repeated objects at once. You’ll also learn how to use Counter objects to enhance other computations that you do in Python.

    interactive-coding-challenges: 120+ Interactive Python Coding Interview Challenges With Anki Flashcards

    Friendlier Tracebacks in REPLs (Including Jupyter) – Tracebacks are often the start of any Python debugging journey. But tracebacks can be difficult to read and confusing to beginners. The friendly-traceback project aims to lift the veil of confusion for tracebacks by providing more helpful error messages with lots of context. New updates to the project include better tracebacks in Jupyter Notebooks!

    Projects:

    • luigi: Python Module That Helps You Build Complex Pipelines of Batch Jobs
    • plotext: Plotting in the Terminal
    • Additional Links:

      • I am the new CPython Developer in Residence: Łukasz Langa
      • Python Success Stories: python.org
      • Using FastAPI to Build Python Web APIs: Real Python Article
      • GitHub Copilot
      • GitHub Copilot: Fly With Python at the Speed of Thought
      • Anki: Powerful, Intelligent Flash Cards
      • friendly-traceback
      • Status of PEP657 in Python 3.11 by Pablo Galindo
      • Episode 69: Planning a Faster Future at the Python Language Summit
      • Metaflow: A Framework for Real-life Data Science
      • Lessons from a real Machine Learning project, part 1: from Jupyter to Luigi
      • Data pipelines, Luigi, Airflow: everything you need to know
      • Level up your Python skills with our expert-led courses:

        • Records and Sets: Selecting the Ideal Data Structure
        • Understanding Python List Comprehensions
        • Python Coding Interviews: Tips & Best Practices
        • Support the podcast & join our community of Pythonistas

          ...more
          View all episodesView all episodes
          Download on the App Store

          The Real Python PodcastBy Real Python

          • 4.7
          • 4.7
          • 4.7
          • 4.7
          • 4.7

          4.7

          136 ratings


          More shows like The Real Python Podcast

          View all
          Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

          Software Engineering Radio - the podcast for professional software developers

          272 Listeners

          The Changelog: Software Development, Open Source by Changelog Media

          The Changelog: Software Development, Open Source

          283 Listeners

          Thoughtworks Technology Podcast by Thoughtworks

          Thoughtworks Technology Podcast

          41 Listeners

          Talk Python To Me by Michael Kennedy

          Talk Python To Me

          592 Listeners

          Software Engineering Daily by Software Engineering Daily

          Software Engineering Daily

          624 Listeners

          Soft Skills Engineering by Jamison Dance and Dave Smith

          Soft Skills Engineering

          269 Listeners

          Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

          Super Data Science: ML & AI Podcast with Jon Krohn

          298 Listeners

          Python Bytes by Michael Kennedy and Brian Okken

          Python Bytes

          213 Listeners

          Data Engineering Podcast by Tobias Macey

          Data Engineering Podcast

          142 Listeners

          Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

          Syntax - Tasty Web Development Treats

          982 Listeners

          DataFramed by DataCamp

          DataFramed

          266 Listeners

          Kubernetes Podcast from Google by Abdel Sghiouar, Kaslin Fields

          Kubernetes Podcast from Google

          181 Listeners

          Practical AI by Practical AI LLC

          Practical AI

          190 Listeners

          The Stack Overflow Podcast by The Stack Overflow Podcast

          The Stack Overflow Podcast

          64 Listeners

          The Pragmatic Engineer by Gergely Orosz

          The Pragmatic Engineer

          52 Listeners