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
|
1698 Discussions
|
Please Login in order to post a comment
run after changing the language to Pypy 3
if name == 'main': n = int(input()) integer_list = map(int, input().split()) t=tuple(integer_list) print(hash(t))
note implement in Pypy3
I solve this way : n = int(input()) elements = input().split()
Does anyone get the hash ((1,2)) equal to the suggested output? I tried on PyCharm and W3 Editor, But both gave a different output (-3550055125485641917).
Can anyone help to clarify to which we need to apply hash()?
Only seems to work in Pypy:
n = int(input()) elements = tuple(map(int, input().split())) print(hash(elements))