We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Basic Data Types
- Tuples
- Discussions
Tuples
Tuples
Sort by
recency
|
1860 Discussions
|
Please Login in order to post a comment
If your code solution is not working on Python 3 can change to Python 2 then code will properly and next thing Python 3 has negitive (-37) so don't work then comes to Python 2 has some chnage in that has given correct code sinppet. if name == 'main': n = int(raw_input()) integer_list = map(int, raw_input().split()) t = tuple(integer_list) print(hash(t)) simple and clear code sinppet
consider the problem and have great solution in easy way
it is only sovable in Python 2 , it is showing wrong answer even if the code is 100% correct in python 3 , they should metion that this problem requries specific python version
Please mention "Solve this question in pyhton2"
if the Hash returns -35... means you are using pypy3 or python3 switch to python2
use this in python 2 this will work : )
n = int(raw_input()) t = tuple(map(int, raw_input().split())) print hash(t)