osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Remove comma from tuples in python.


On 21/02/2014 08:27, Gary Herron wrote:
>
> A bit of notation, because I''m not sure we are communicating well here:
>    A tuple is a Python data structure.  It has no commas or
> parentheses.   The *printing* of a Python tuple uses both for it's
> appearance on the output, but the tuple itself has no such thing.
>

 >>> a = 1,2,3
 >>> type(a)
<class 'tuple'>

I see commas and a tuple above but I don't see a print.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com