Serhiy Storchaka added the comment:
Your example works for me.
>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> zipped = zip(x, y)
>>> print(zipped)
>>> print(list(zipped))
[(1, 4), (2, 5), (3, 6)]
I guess you have overridden the builtin function "zip" by setting the global
variable "zip".
>>> zip =
Muhammad Salem added the comment:
---
TypeError Traceback (most recent call last)
in ()
6 x = [1, 2, 3]
7 y = [4, 5, 6]
> 8 zip(x, y)
TypeError: 'tuple' object is not callable
New submission from Muhammad Salem:
this code from the python documentation itself not working!
>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> zipped = zip(x, y)
this code is copied from the python 3 official documentation itself even though
it is working for me I am using python 3.5.2 on ubuntu 16.0