bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Python/Foundations
Python•Foundations

Python - Join Tuples

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind Python - Join Tuples?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ = ("a", "b" , "c")

Join Two Tuples

To join two or more tuples you can use the + operator:

Example

tuple1 = ("a", "b" , "c")
tuple2 = (1, 2, 3)

tuple3 = tuple1 + tuple2

print(tuple3)

Multiply Tuples

If you want to multiply the content of a tuple a given number of times, you can use the * operator:

Example

fruits = ("apple", "banana", "cherry")
mytuple = fruits * 2

print(mytuple)

Previous

Python - Loop Tuples

Next

Python - Tuple Methods