Python Practice › Tuple Programs › Program 42
String to a tuple of characters
Write a Python program to convert a string into a tuple of characters.
Input
"Sqatools"
Output
('S', 'q', 'a', 't', 'o', 'o', 'l', 's')Approach
tuple(text).
Solution
print(tuple("Sqatools"))Output
('S', 'q', 'a', 't', 'o', 'o', 'l', 's')Learn the concept
New to this topic? Read the lesson, then come back.