Skip to content

Instantly share code, notes, and snippets.

@chaityacshah
Last active July 21, 2018 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaityacshah/f79f36bd48937663762191fa82e93d10 to your computer and use it in GitHub Desktop.
Save chaityacshah/f79f36bd48937663762191fa82e93d10 to your computer and use it in GitHub Desktop.
test cases for stackoverflow question

1

pprint.pprint(parse("(dog:20, (elephant:30, horse:60)eh:20)root:50"))

2

pprint.pprint(parse("(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5,G:0.8)F:0.9"))

3

pprint.pprint(parse("(ant:17, (bat:31, cow:22)bc:7, dog:22, (elk:33, fox:12)ef:40)root:1"))

4

pprint.pprint(parse("(Bovine:0.69395,(Gibbon:0.36079,(Orang:0.33636,(Gorilla:0.17147,(Chimp:0.19268, Human:0.11927)ch:0.08386)gch:0.06124)ggch:0.15057)oggch:0.54939,Mouse:1.21460)root:1"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment