Skip to main content

Join Two Tuples

The + operator combines two or more tuples into a single tuple:

Example

Combine two tuples with +:

Prompt
Create two tuples: one with letters "a", "b", "c" and one with numbers 1, 2, 3. Join them using the + operator and print the result.
Output: complete Python program

Multiply Tuples

The * operator repeats the content of a tuple as many times as you ask:

Example

Multiply fruits by 2 to get each item twice:

Prompt
Create a tuple with three fruits. Multiply it by 2 using the * operator and print the result.
Output: complete Python program