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
|
1754 Discussions
|
Please Login in order to post a comment
"I can tell you put a lot of time into researching this, thank you!"
travis scott merch
Try this in pypy3
if name == 'main': n = int(input()) integer_list = map(int, input().split()) t=tuple(integer_list) print(hash(t))
For python users using hash(tuple):
The issue you're encountering isn't with your logic but rather with the behavior of Python's hash() function. The output of hash() in Python can vary between runs or environments due to Python's hash randomization feature. This is a security feature introduced to prevent certain types of attacks.
my code is :
But this code giving me the wrong answer.. Why?? Can anyone tell.??
In google colab, this code runs excatly as expected but I don't know how do I take the integer inputs given in single line separated by 'space'. Please tell me how do I take such inputs given in single line.