• Skip to primary navigation
  • Skip to content
  • Skip to footer
Looking for data in all the right places...
  • Portfolio
  • Posts
  • Categories
  • Tags
  • About
    Francis T. O'Donovan

    Francis T. O'Donovan

    Principal Data Scientist at TriNet – Planet discoverer, researcher, developer, geek.

    • Boston, MA
    • Website
    • Email
    • Bitbucket
    • GitHub
    • Google Scholar
    • KeyBase
    • LinkedIn
    • Medium
    • ORCiD
    • ResearchGate
    • StackOverflow
    • Twitter
    • Mastodon
    • Keyoxide

    Python: Difference between append and ‘+=’ for lists

    April 5, 2017 less than 1 minute read

    In many applications += and append are interchangeable, but for Python lists they are not.

    If you are appending a list of lists to another list of lists, append will only append the first list; you need to use += in order to join all of the lists at once.

    Via Kaggle.com.

    Tags: python, til

    Categories: til

    Updated: April 26, 2023

    Share on

    Twitter Facebook LinkedIn
    Previous Next

    Leave a comment

    You may also enjoy

    Stoicism and the pursuit of a good life

    December 17, 2025 2 minute read

    Given my first name, it’s probably not surprising that I am familiar with the Serenity Prayer:

    30 learnings from 30 years as a Python freelancer

    December 17, 2025 less than 1 minute read

    I found some tips and general thoughts on what it takes to be a successful freelancer, and why that career can be so fulfilling. Some highlights:

    Writing Code Was Never The Bottleneck

    July 24, 2025 less than 1 minute read

    With all the recent hype around large language models (LLMs) and their ability to effortlessly generate code, Pedro Tavares reminds us that it’s worth reflec...

    Declare your python dependencies within your Jupyter notebook

    January 16, 2025 less than 1 minute read

    Reproducible workflows are simplified with tools like Nix for shell scripts and juv for Jupyter notebooks, enabling dependency declarations directly within s...

    • Follow:
    • Feed
    © 2025 Francis T. O'Donovan. Powered by Jekyll & Minimal Mistakes.