0% found this document useful (0 votes)
3 views1 page

Python - Join Tuples

The document provides instructions on how to join and multiply tuples in Python using the + and * operators, respectively. It includes examples demonstrating these operations with sample tuples. Additionally, there is an exercise prompting users to identify the correct syntax for joining tuples.

Uploaded by

9rbtv5f4dy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python - Join Tuples

The document provides instructions on how to join and multiply tuples in Python using the + and * operators, respectively. It includes examples demonstrating these operations with sample tuples. Additionally, there is an exercise prompting users to identify the correct syntax for joining tuples.

Uploaded by

9rbtv5f4dy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

 Menu  Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA

Python - Join Tuples


‹ Previous Next ›

Join Two Tuples


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

Example Get your own Python Server

Join two tuples:

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


tuple2 = (1, 2, 3)

tuple3 = tuple1 + tuple2


print(tuple3)

Try it Yourself »

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

Example
Multiply the fruits tuple by 2:

fruits = ("apple", "banana",


"cherry")
mytuple = fruits * 2

print(mytuple)

Try it Yourself »

Exercise ?

What is a correct syntax for joining


tuple1 and tuple2 into tuple3 ?

tuple3 = join(tuple1,
tuple2)

tuple3 = tuple1 + tuple2

tuple3 = [tuple1, tuple2]

Submit Answer »

‹ Previous Next ›

Sign in to track progress

56
COLOR PICKER

 

REMOVE ADS


-->
PLUS

SPACES

GET CERTIFIED

FOR TEACHERS

BOOTCAMPS

CONTACT US

Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
[Link] Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial

Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
[Link] Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
AngularJS Reference
jQuery Reference

Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
[Link] Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples

Get Certified
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
SQL Certificate
Python Certificate
PHP Certificate
jQuery Certificate
Java Certificate
C++ Certificate
C# Certificate
XML Certificate

   

FORUM ABOUT
ACADEMY

W3Schools is optimized for learning and


training. Examples might be simplified to
improve reading and learning. Tutorials,
references, and examples are constantly
reviewed to avoid errors, but we cannot
warrant full correctness of all content.
While using W3Schools, you agree to
have read and accepted our terms of
use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data.


All Rights Reserved. W3Schools is
Powered by [Link].

You might also like