Urgent.News

What's breaking now, across thousands of outlets.

Tech

Python Data Structures Explained: Lists, Tuples, Sets and Dictionaries

Originally published on CodingCush . Python data structures are the built-in containers that hold groups of values in your program: lists for ordered, changeable collections; tuples for ordered, fixed collections; sets for unique values with no duplicates; and dictionaries for labelled values stored as key and value pairs. Choosing the right container makes your code shorter, faster and easier to…

Python data structures are built-in containers in Python programs that gather values together. There are four types of containers: lists, tuples, sets, and dictionaries, each with its own unique characteristics.

Lists are ordered and changeable collections written inside square brackets. They can be modified after creation by adding, removing, replacing, or sorting items. Lists are ideal for collections that will grow or shrink over time, such as shopping carts, to-do items, and search results.

Tuples are similar to lists but are written with round brackets and cannot be changed once created. They are best suited for fixed groups of values that should stay together, such as coordinates, RGB colors, dates, and database records. Tuples can also be used as dictionary keys because they cannot be edited by accident.

Sets store unique values only, written with curly brackets. Adding the same value multiple times results in it being stored only once. Sets do not guarantee a specific order, but they allow for fast membership checking and efficient operations like union, intersection, and difference between groups.

Dictionaries store pairs of keys and values, with keys labeling the values. They are written with curly brackets and use square brackets to access values by their keys. Dictionaries are perfect for modelling real-world objects, as they allow easy access to values using labels. Keys must be unique and unchangeable types like strings or numbers, while values can be anything.

When deciding which container to use, ask three questions: do the values need labels, must duplicates disappear, or is fast membership checking the main job? If labels are needed, choose a dictionary. If duplicates need to be removed or membership checking is the main job, choose a set. If the group should stay exactly as created and is best suited for ordered collections that will grow or shrink, choose a list.

For everything else, the everyday growing, shrinking, ordered collection, choose a list. Most beginner programs can easily handle lists and dictionaries alone.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Squid forward-proxy security depends on ACL order and a closed default

Squid forward-proxy security depends on ACL order and a closed default A Squid forward proxy can be a controlled egress gateway or an open relay into internal networks.

  • Squid proxy security relies on ACL order and deny-all policy
  • Process httpaccess rules sequentially; first matching rule determines outcome
  • Final deny-all rule followed by targeted allow rules fortifies security

Catch Overlapping Labels Before Rendering With a Sweep Over X

First published on Homingo Learn . A label that fits today can land on its neighbor tomorrow when someone renames a metric or adds a series, and you may not notice until the chart is on screen.

  • Labels' boxes calculated based on text length and size
  • Overlapping detection via sequential processing and active list
  • Method efficient without full chart rendering

Email, SMS, and In-App Alerts Do Different Jobs. Stop Scoring Them as Rivals.

Dunning channel debates usually start with open rates, which is a little like choosing a vehicle by top speed. The question is never which channel is best in the abstract.

  • Email provides explanations and context in failed-payment sequence
  • SMS grabs attention with concise, urgent notifications
  • In-app alerts leverage active user engagement for seamless solutions

What Is Webflow? Explained Simply for Beginners

Originally published on CodingCush . Webflow is a visual website builder that lets you design, build and host websites by dragging and arranging elements on a canvas, while it writes clean HTML, CSS…

  • Webflow is a visual platform to create websites without coding
  • Offers drag-and-drop builder, responsive design, CMS and ecommerce
  • Hosts sites with fast, secure environment for marketing sites and shops

Compress Images Without Uploading: How Browser-Only Tools Protect Your Files

Compress images without uploading: the short answer Yes, you can compress an image without uploading it. A browser can read a file you choose, resize or re-encode it on your device, and generate a…

  • Browser-based tools compress images without uploading to servers.
  • Image processing occurs within the device using browser APIs.
  • Metadata handling is user-controlled, with default off for photo metadata.

Cursor's Build Live Apps Turns a Prompt Into a Hosted Web App

Nothing here is sponsored — no affiliate links on this page. This breaking article is not the daily buyer-intent post. Facts below come from the sources listed at the end, checked 6 November 2026.

  • Cursor launched Build Live Apps on November 5, 2026
  • Developers describe app in plain language for automatic building
  • App hosted, secured, and live within existing editor

More from Saturday 7 November →