How to initialize variables with tuple values in Python

1 Answer

0 votes
t = ('python', 'java', 'php', "c")

(a, b, c, d) = t

print(a)
print(b)
print(c)
print(d)


'''
run:

python
java
php
c

'''

 



answered Oct 30, 2018 by avibootz

Related questions

3 answers 461 views
1 answer 179 views
2 answers 378 views
2 answers 258 views
1 answer 213 views
213 views asked Apr 27, 2021 by avibootz
...