How to join two tuples in Python

1 Answer

0 votes
tpl1 = ("Python", "Java", "PHP")
tpl2 = ("a", "b", "c", "d", "e")

jt = zip(tpl1, tpl2)

print(tuple(jt))


'''
run:

(('Python', 'a'), ('Java', 'b'), ('PHP', 'c'))

'''

 



answered Dec 18, 2018 by avibootz

Related questions

2 answers 145 views
2 answers 315 views
1 answer 173 views
173 views asked Dec 18, 2018 by avibootz
1 answer 238 views
1 answer 164 views
3 answers 172 views
...