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
|
1907 Discussions
|
Please Login in order to post a comment
Code is for Python 2: like or upvote if it works for you too. thanks... :)
if name == 'main': n = int(raw_input()) integer_list = tuple(map(int, raw_input().split())) print(hash(integer_list))
Note : Try this code in Python 2 version not 3 or pypi 3
n = int(input()) t = tuple(map(int, input().split())) print(hash(t))
if name == "main": n = int(input()) integer_list = tuple(map(int, input().split())) print(hash(integer_list))
I have run this exercise code many times, but it returns a negative output. What is the problem?
#PYTHON 3
CODE: n=int(input()) list_number=list(map(int,input().split())) tuple_number=tuple(list_number) print(hash(tuple_number))
This code why not work every one see this explain please