Using Tuples : Introduction : Tuple PYTHON TUTORIALS


PYTHON TUTORIALS » Tuple » Introduction »

 

Using Tuples


hexStringChars = ('A''B','C''D''E''F')
hexStringNums = ('1''2''3''4''5''6','7''8''9','0')
hexStrings = ["1FC""1FG""222""Ten"]

for hexString in hexStrings:
    for x in hexString:
        if ((not x in hexStringCharsand (not x in hexStringNums)):
            print hexString+ " is not a hex string."
            break

tupleList = list(hexStringChars)
listTuple = tuple(hexStrings)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tuple
» Introduction