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












-1















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?










share|improve this question







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.


















    -1















    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?










    share|improve this question







    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.
















      -1












      -1








      -1








      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?










      share|improve this question







      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






      share|improve this question







      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.











      share|improve this question







      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.









      share|improve this question




      share|improve this question






      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.






















          0






          active

          oldest

          votes

















          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          Список кардиналов, возведённых папой римским Каликстом III

          Deduzione

          Mysql.sock missing - “Can't connect to local MySQL server through socket”