<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-2">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
<br>
Peter Otten wrote:<br>
<blockquote type="cite" cite="midcer5pq$is$02$1@news.t-online.com">
<pre wrap=""> File "<stdin>", line 1
() == (,)
^
SyntaxError: invalid syntax</pre>
</blockquote>
I said this:<br>
<br>
"Try to add one comma for each element - that will do the stuff."<br>
<br>
How many elements do you want? <br>
For zero elements, you should add zero commas. ;-)<br>
<blockquote type="cite" cite="midcer5pq$is$02$1@news.t-online.com">
<pre wrap="">
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">(1) == (1,)
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->False</pre>
</blockquote>
Of course. The first one is not a tuple.<br>
<blockquote type="cite" cite="midcer5pq$is$02$1@news.t-online.com">
<pre wrap="">
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">(1, 2) == (1, 2,)
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->True</pre>
</blockquote>
Yes, because you can omit the last comma if there is at least one
element.<br>
<br>
<pre wrap="">
</pre>
</body>
</html>