⊗pyPmTpAS 65 of 208 menu

Alternative Tuple Syntax in Python

There is also an alternative syntax for writing tuples - without parentheses:

tpl = 'a', 'b', 'c'

However, this is not recommended because it makes it easy to confuse tuples with other types of objects in Python.

Given a variable:

tst = 1, 2, 3, 4

Tell me what type of data it is.

Given a variable:

tst = ['12', '34', '56', '78']

Tell me what type of data it is.

Given a variable:

tst = '1,2,3,4'

Tell me what type of data it is.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline