Converting List of 3 Element Tuple to Dictionary [on hold]

Multi tool use
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
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
NeoNeo
1
1
New contributor
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Neo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
AF0,uCfPrsC T NBvOe0UHqSrka,3h2oPX INLEgZRKGTik3e70 J,1AX5Oo8AnSfqpD4MDKOANad