Skip to content

Instantly share code, notes, and snippets.

@mahmoud
Created January 18, 2019 06:21
Show Gist options
  • Select an option

  • Save mahmoud/f19641c7d44922e1defb9b284951f3e7 to your computer and use it in GitHub Desktop.

Select an option

Save mahmoud/f19641c7d44922e1defb9b284951f3e7 to your computer and use it in GitHub Desktop.

Revisions

  1. mahmoud created this gist Jan 18, 2019.
    9 changes: 9 additions & 0 deletions list_meets_tuple.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    >>> x = [1]
    >>> y = (2, 3)
    >>> x + y
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    TypeError: can only concatenate list (not "tuple") to list
    >>> x += y
    >>> x
    [1, 2, 3]