Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4094656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:46:20+00:00 2026-05-20T19:46:20+00:00

guys I’ve written a piece of code which gives the output. Now, this is

  • 0

guys I’ve written a piece of code which gives the output. Now, this is a trie. Now I want to display in a aesthetic manner. Someone help me out here . My representation should be like this http://en.wikipedia.org/wiki/File:Trie_example.svg

But what I want is how to convert this huge monster output to the neat output like this [(1,2), (1,3), (1,4), (3,4)] ????

defaultdict(<type 'int'>, {'A': 1, 'W': 12})
defaultdict(<type 'int'>, {'A': 2, 'X': 25})
defaultdict(<type 'int'>, {'A': 3})
defaultdict(<type 'int'>, {'A': 4})
defaultdict(<type 'int'>, {'S': 5})
defaultdict(<type 'int'>, {'S': 6})
defaultdict(<type 'int'>, {'S': 7})
defaultdict(<type 'int'>, {'D': 8})
defaultdict(<type 'int'>, {'D': 9})
defaultdict(<type 'int'>, {'D': 10})
defaultdict(<type 'int'>, {'D': 11})
defaultdict(<type 'int'>, {})
defaultdict(<type 'int'>, {'R': 16, 'E': 13, 'F': 19})
defaultdict(<type 'int'>, {'E': 14})
defaultdict(<type 'int'>, {'E': 15})
defaultdict(<type 'int'>, {})
defaultdict(<type 'int'>, {'R': 17})
defaultdict(<type 'int'>, {'T': 18})
defaultdict(<type 'int'>, {})
defaultdict(<type 'int'>, {'F': 20})
defaultdict(<type 'int'>, {'F': 21})
defaultdict(<type 'int'>, {'D': 22})
defaultdict(<type 'int'>, {'D': 23})
defaultdict(<type 'int'>, {'D': 24})
defaultdict(<type 'int'>, {})
defaultdict(<type 'int'>, {'C': 26})
defaultdict(<type 'int'>, {'C': 27})
defaultdict(<type 'int'>, {'V': 28})
defaultdict(<type 'int'>, {'S': 29})
defaultdict(<type 'int'>, {})
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T19:46:21+00:00Added an answer on May 20, 2026 at 7:46 pm

    You should try Pydot ! This package allow you to create some graphs line :

    import pydot 
    
    edges = [(1,2), (1,3), (1,4), (3,4)] 
    g = pydot.graph_from_edges(edges) 
    g.write_jpeg('graph_from_edges_dot.jpg', prog='dot')
    

    The result

    To install it :

    pip install pydot
    

    (you can also use easy_install or PyPM if you prefer)

    pydot needs pyparsing in order to load DOT files and graphviz to render the graphs.

    If you want to have a png picture (for example), you can replace the line

    g.write_jpeg('graph_from_edges_dot.jpg', prog='dot')
    

    by

    g.write('graph_from_edges_dot.png', prog='dot', format='png')
    

    or

    g.write_png('graph_from_edges_dot.png', prog='dot')
    

    Full documentation is available here:
    PyDot documentation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

guys i have a xml file which is like this: <Point TestFlag=0 id=1 name=Conversation
guys. I have UITableView with different cells and I have code, which counts height.
Guys here is my html form code. What I want is when I click
guys, I want to parse a xml in android which is got by HTTPPost
guys. I tried this code: def trap_check(payroll[][], timelive[][]) . . . end I was
Guys I have an activity which has a home button, when the button is
guys, I would like to you evaluate next code below. As you see, I
Guys, I've came across this problem I can't resolve myselg, I'm pretty sure I
guys which text editor is good for Rubyonrails? i m using Windows and i
guys, I have iOS app, which running good on ios5.0, but on 4.3.3 it's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.