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 149 views
2 answers 322 views
1 answer 176 views
176 views asked Dec 18, 2018 by avibootz
1 answer 241 views
1 answer 170 views
3 answers 180 views
...