I was trying to add two tuples two create a new sort of nested tuple using the coerce function of python.
I'm using python version 3.7 which is showing that the function isn't defined.
It is supposed to be a built-in function in python
I was trying to add two tuples two create a new sort of nested tuple using the coerce function of python.
I'm using python version 3.7 which is showing that the function isn't defined.
It is supposed to be a built-in function in python
You don't need coerce
:
In [16]: t1 = (1,2)
In [17]: t2 = (3,4)
In [18]: t1 + t2
Out[18]: (1, 2, 3, 4)
No, because in Python 2, it only worked to coerce numeric types to be compatible, and it won't contribute to helping create a nested tuple or do anything aside from element-level conversions.
More importantly, it no longer exists.