You need to make the second element a 1-tuple, eg:

a = ('2',)
b = 'z'
new = a + (b,)
Answer from Jon Clements on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-append-elements-in-python-tuple
Add Element to Tuple In Python - GeeksforGeeks
July 23, 2025 - You can't directly append an element to a tuple, but you can create a new tuple by combining the original tuple with the new element.
Discussions

How do you add item to a tuple list you are looping over? I know with lists you use an iterator but it doesn't seem to work with tuple?
tuples are immutable. for i, x in enumerate(combos[:]): print(x) print(x[0]) print(x[1]) combos.remove(combos[i]) tuple_to_be_added = (" x += (x[0].similarity(x[1]),) ", " doesn't mean anything ") combos.insert(i,tuple_to_be_added) print(combos[i]) this should work. More on reddit.com
๐ŸŒ r/learnpython
32
0
May 22, 2022
python - Efficient way to add elements to a tuple - Stack Overflow
I want to add elements to a tuple. I found 2 ways to do it. This and this answers say add two tuples. It will create a new tuple a = (1,2,3) b = a + (5,) Where as this says, convert the tuple to l... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Adding elements to an empty tuple-python
In my opinion, it never worked. The tuple really is immutable. Its content can sometimes be changed (then the tuple object is still immutable but not hashable), but the number of elements can never change. You should never be able to add elements to an empty tuple. More on experts-exchange.com
๐ŸŒ experts-exchange.com
October 10, 2024
Ways to unpack a tuple with 1 element
There's also [hist] = conn.query(hist_query).fetchone() More on reddit.com
๐ŸŒ r/Python
38
31
April 28, 2022
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_tuples_update.asp
Python - Update Tuples
Create a new tuple with the value "orange", and add that tuple: thistuple = ("apple", "banana", "cherry") y = ("orange",) thistuple += y print(thistuple) Try it Yourself ยป ยท Note: When creating a tuple with only one item, remember to include a comma after the item, otherwise it will not be identified as a tuple.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ how do you add item to a tuple list you are looping over? i know with lists you use an iterator but it doesn't seem to work with tuple?
r/learnpython on Reddit: How do you add item to a tuple list you are looping over? I know with lists you use an iterator but it doesn't seem to work with tuple?
May 22, 2022 -
combos = [(Walking down the road on the pavement., Working with computers and programming can be engaging.), (Walking down the road on the pavement., Let us discuss programming in detail.), (Working with computers and programming can be engaging., Let us discuss programming in detail.)]


for x in combos:
  print(x)
  print(x[0])
  print(x[1])
  x += (x[0].similarity(x[1]),)
  print(x)

print(combos)

Nothing has then changed in the combos tuple. So I try iterator like I would with lists:

combos = [x += (x[0].similarity(x[1]),) for x in combos]
                ^^
SyntaxError: invalid syntax

Can I still use list iterator but my syntax was just wrong somehow?

How to deal with these things? Tuples seem more of a nuisance to deal with than other objects but the return list from collections brings a tuple so thought I might as well continue to work with it rather than convert to something else if it is a simple fix.

I want to loop over the existing tuple objects, doing the similarity check on each and appending the result of the check to the current tuple item.

EDIT: Clarifying what I want to do.

EDIT2: More clarifying.

๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
Add, Update, Remove Tuple Items in Python | note.nkmk.me
April 29, 2025 - A tuple with one element requires a comma in Python ยท To add new items at the beginning or end of a tuple, use the + operator as mentioned above.
๐ŸŒ
Devcamp
bottega.devcamp.com โ€บ full-stack-development-javascript-python โ€บ guide โ€บ how-to-add-elements-tuple-leveraging-re-assignment
How to Add Elements to a Tuple by Leveraging Re-Assignment
So we can't simply rely on hard coding our elements. Instead what we're going to have to do is we're going to dynamically alter this on the fly and leverage reassignment in order to do it. So I'm going to come here and let's walk through reassignment so I'm gonna say post and say post = post which is our current tuple plus and now we're going to add our new tuple element.
Find elsewhere
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ How-to-append-elements-in-Python-tuple
How to append elements in Python tuple?
August 22, 2023 - In this example, we are updating a tuple by slicing it into two parts and inserting new elements between the slices โˆ’ ยท # Original tuple T1 = (37, 14, 95, 40) # Elements to be added new_elements = ('green', 'blue', 'red', 'pink') # Extracting slices of the original tuple # Elements before index 2 part1 = T1[:2] # Elements from index 2 onward part2 = T1[2:] # Create a new tuple updated_tuple = part1 + new_elements + part2 # Printing the updated tuple print("Original Tuple:", T1) print("Updated Tuple:", updated_tuple)
๐ŸŒ
Medium
medium.com โ€บ @anusoosanbaby โ€บ how-to-add-elements-to-tuples-in-python-5d130b9c37ef
How to Add Elements to Tuples in Python | by Anusoosanbaby | Medium
October 4, 2024 - To add elements to a tuple, you can create a new tuple by concatenating the original tuple with a new tuple that contains the additional elements.
๐ŸŒ
Bobby Hadz
bobbyhadz.com โ€บ blog โ€บ python-tuple-insert-element
Insert/Append an Element into a Tuple in Python | bobbyhadz
April 9, 2024 - Tuples are immutable, so to append an element into a tuple, we have to create a new tuple that contains the element. ... Copied!my_tuple = ('a', 'b', 'c') # โœ… Add an element at the end of a tuple new_tuple = my_tuple + ('d',) # ๐Ÿ‘ˆ๏ธ note ...
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ python โ€บ add element to tuple in python
Add Element to Tuple in Python - Spark By {Examples}
May 31, 2024 - How to add elements to a tuple in python? Tuples in Python are similar to lists but they cannot be changed. This makes them useful in certain situations.
๐ŸŒ
PyTutorial
pytutorial.com โ€บ how-to-add-to-a-tuple-in-python
PyTutorial | How to Add to a Tuple in Python
January 27, 2026 - Then you can add new elements at the start, middle, or end. This is a very Pythonic approach. base_tuple = (10, 20, 30) print("Base Tuple:", base_tuple) # Add to the end tuple_end = (*base_tuple, 40, 50) print("Added to End:", tuple_end) # Add to the beginning tuple_start = (0, 5, *base_tuple) print("Added to Start:", tuple_start) # Add in the middle (more complex) tuple_middle = (*base_tuple[:2], 25, *base_tuple[2:]) print("Added in Middle:", tuple_middle)
๐ŸŒ
Tutorial Reference
tutorialreference.com โ€บ python โ€บ examples โ€บ faq โ€บ python-how-to-insert-an-elment-into-a-tuple
How to Add Elements to Tuples in Python | Tutorial Reference
The most direct and Pythonic way to "append" to a tuple is to create a new tuple by concatenating the original tuple with a new tuple containing the element(s) you want to add.
๐ŸŒ
CodeRivers
coderivers.org โ€บ blog โ€บ python-add-tuple
Python Add Tuple: A Comprehensive Guide - CodeRivers
February 22, 2026 - This method can be useful when you want to insert elements at specific positions. tuple3 = (1, 2, 3) new_element = 4 new_tuple2 = (*tuple3, new_element) print(new_tuple2) Here, we unpack the elements of tuple3 using the * operator and then add the new_element at the end to create a new tuple new_tuple2.
๐ŸŒ
CodeGenes
codegenes.net โ€บ blog โ€บ how-to-add-to-a-tuple-in-python
Adding Elements to a Tuple in Python โ€” codegenes.net
In this example, we create a new ... can be used to repeat a tuple a certain number of times. You can combine this with the + operator to add elements....
๐ŸŒ
Experts Exchange
experts-exchange.com โ€บ questions โ€บ 29277836 โ€บ Adding-elements-to-an-empty-tuple-python.html
Solved: Adding elements to an empty tuple-python | Experts Exchange
October 10, 2024 - t = (1, 2, 3, 4, 5.6) print(t, type(t), id(t)) t = tuple( i**2 if i%2 == 0 else i**3 for i in t ) print(t, type(t), id(t)) ... EARN REWARDS FOR ASKING, ANSWERING, AND MORE. Earn free swag for participating on the platform. ... Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in other languages.
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-tuples-tutorial
Python Tuples Tutorial: Create & Use Tuples Functions with Examples | DataCamp
February 7, 2018 - However, this is often a debatable ... article for the same. For now, lets just say tuples are immutable in general. You can't add elements to a tuple because of their immutable property....
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ python-program-to-add-elements-to-a-tuple
Python Program to add elements to a Tuple
February 17, 2023 - We know that we can use the list method to convert the tuples to lists and then we can make use of append method of list to add however many items we like, when we will be done with adding elements, we then convert the list to tuple using type conversion. This is a roundabout way of adding elements, but it saves us the effort to check for type mismatch between + operators.
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ python โ€บ add element by element of tuples in python
Add Element by Element of Tuples in Python - Spark By {Examples}
May 31, 2024 - How to add tuples by element by element in python? Tuple in Python is a fundamental data structure that allows you to store multiple values in a single