Converting List of 3 Element Tuple to Dictionary [on hold]
I have one 3d list of tuple
list=[(0, 1, 6), (5,1,4), (1, 6, 0), (3, 2,1),(4,5,1)]
I want to add in a dictionary like this:
{ (0,1,6): 2,
(4,5,1): 2,
(3,2,1): 1 }
I want to count the similar tuples.
Any suggestions?
python
New contributor
put on hold as off-topic by Gerrit0, vnp, Jamal♦ 2 days ago
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Jamal
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Gerrit0, vnp
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I have one 3d list of tuple
list=[(0, 1, 6), (5,1,4), (1, 6, 0), (3, 2,1),(4,5,1)]
I want to add in a dictionary like this:
{ (0,1,6): 2,
(4,5,1): 2,
(3,2,1): 1 }
I want to count the similar tuples.
Any suggestions?
python
New contributor
put on hold as off-topic by Gerrit0, vnp, Jamal♦ 2 days ago
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Jamal
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Gerrit0, vnp
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I have one 3d list of tuple
list=[(0, 1, 6), (5,1,4), (1, 6, 0), (3, 2,1),(4,5,1)]
I want to add in a dictionary like this:
{ (0,1,6): 2,
(4,5,1): 2,
(3,2,1): 1 }
I want to count the similar tuples.
Any suggestions?
python
New contributor
I have one 3d list of tuple
list=[(0, 1, 6), (5,1,4), (1, 6, 0), (3, 2,1),(4,5,1)]
I want to add in a dictionary like this:
{ (0,1,6): 2,
(4,5,1): 2,
(3,2,1): 1 }
I want to count the similar tuples.
Any suggestions?
python
python
New contributor
New contributor
New contributor
asked 2 days ago
NeoNeo
1
1
New contributor
New contributor
put on hold as off-topic by Gerrit0, vnp, Jamal♦ 2 days ago
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Jamal
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Gerrit0, vnp
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by Gerrit0, vnp, Jamal♦ 2 days ago
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." – Jamal
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Gerrit0, vnp
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes