[Python] Hackerrank task with hash(t) - why it only worked for python 2 [closed]

Discussão em 'Python' iniciado por Stack, Junho 16, 2025.

  1. Stack

    Stack Membro Participativo

    Here is the task that is simple to solve but quiet problematic to submit.

    After checking multiple forums and solutions the only one which worked was this one for python2.

    if __name__ == '__main__':
    n = int(raw_input())
    integer_list = map(int, raw_input().split())
    print(hash(tuple(integer_list)))


    Can you explain why it is like that?

    Thanks

    I tried Python3 and PyPy3 but it didnt work.

    Continue reading...

Compartilhe esta Página