The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use tuple(text) when you want each character in a string to become an item. To make a tuple of words or other fields, split the string first, then pass the result to tuple().
Convert each character into a tuple item
A string is iterable, so tuple() places its items—in this case, its characters—in order:
text = "abc"
result = tuple(text)
print(result) # ('a', 'b', 'c')
This follows Python’s documented example: tuple('abc') produces ('a', 'b', 'c'). Use this form when individual characters, rather than words, should be the tuple’s elements.
Convert words or separated fields into a tuple
Call split() to divide a string into parts, then convert the resulting list to a tuple.
#1 Best Overall
Split on whitespace to get words
text = "red green blue"
words = tuple(text.split())
print(words) # ('red', 'green', 'blue')
With no separator argument, str.split() treats consecutive whitespace as a single boundary and omits empty items caused by whitespace at the beginning or end.
Split on a specific delimiter
text = "red,green,blue"
fields = tuple(text.split(","))
print(fields) # ('red', 'green', 'blue')
Passing a separator makes the split literal. For example, tuple("1,,2".split(",")) returns ('1', '', '2'): consecutive commas create an empty field. An explicit separator on an empty string also preserves an empty field: tuple("".split(",")) returns ('',).
Rank #2
Choose the conversion that matches the intended items
| Desired tuple items | Expression | Example result |
|---|---|---|
| Characters | tuple(text) |
tuple("abc") → ('a', 'b', 'c') |
| Words separated by whitespace | tuple(text.split()) |
tuple("red green".split()) → ('red', 'green') |
| Fields separated by a chosen delimiter | tuple(text.split(delimiter)) |
tuple("red,green".split(",")) → ('red', 'green') |
Remember the comma for a one-item tuple
If splitting produces one item, tuple() still returns a tuple. When writing a tuple literal directly, the comma—not the parentheses—is what marks a single-item tuple: (value,) or value,. Python’s tuple syntax documentation explains this distinction.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →




