Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding Regex Groups
#5
(Jan-10-2021, 12:54 AM)matt_the_hall Wrote: As for tuples, my understanding is that a tuple is a fixed size (2) list.

Tuples are similar to lists (they're sequences, fixed length, etc.) The main difference is that lists can be changed after creation and tuples cannot. If you want a slightly different tuple, you have to copy the data into a new, immutable object. For someone reading the information from a tuple rather than creating them, there's almost no difference and you can treat them as a special kind of list.

The name comes from the common part of higher named multiples. Like you might say quintuple or sextuple, "n-tuple" or "tuple" is just a generalization of a sequence with n elements.
matt_the_hall likes this post
Reply


Messages In This Thread
Understanding Regex Groups - by matt_the_hall - Dec-16-2020, 07:16 PM
RE: Understanding Regex Groups - by bowlofred - Dec-16-2020, 07:23 PM
RE: Understanding Regex Groups - by bowlofred - Dec-16-2020, 07:45 PM
RE: Understanding Regex Groups - by matt_the_hall - Jan-10-2021, 12:54 AM
RE: Understanding Regex Groups - by bowlofred - Jan-10-2021, 01:42 AM
RE: Understanding Regex Groups - by matt_the_hall - Jan-11-2021, 02:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Random student selection from groups. esahan 7 2,014 Jul-08-2024, 12:28 AM
Last Post: AdamHensley
  How to group related products in relationship groups? RegionHUser 2 1,039 Jun-02-2024, 03:51 PM
Last Post: Pedroski55
  Ldap Search for finding user Groups ilknurg 1 2,987 Mar-11-2022, 12:10 PM
Last Post: DeaD_EyE
  Make Groups with the List Elements quest 2 2,820 Jul-11-2021, 09:58 AM
Last Post: perfringo
  Help understanding RegEx logic/output pyNewbee 4 3,394 Nov-15-2020, 02:21 AM
Last Post: pyNewbee
  How to solve equations, with groups of variables and or constraints? ThemePark 0 2,290 Oct-05-2020, 07:22 PM
Last Post: ThemePark
  Create homogeneous groups with Kmeans ? preliator 0 2,110 Sep-01-2020, 02:29 PM
Last Post: preliator
  Regex: finding if three groups have a value in them Daring_T 7 4,952 May-15-2020, 12:27 AM
Last Post: Daring_T
  How to take group of numbers summed in groups of 3... jaguare22 1 2,174 May-05-2020, 05:23 AM
Last Post: Yoriz
  Listing groups tharpa 2 3,359 Nov-26-2019, 07:25 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020