Quantcast
Viewing latest article 9
Browse Latest Browse All 10

Answer by mipadi for Add variables to tuple

It's as easy as the following:

info_1 = "one piece of info"info_2 = "another piece"vars = (info_1, info_2)# 'vars' is now a tuple with the values ("info_1", "info_2")

However, tuples in Python are immutable, so you cannot append variables to a tuple once it is created.


Viewing latest article 9
Browse Latest Browse All 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>