Skip to content

Commit

Permalink
Updates README.md with example of the new common_sub() function
Browse files Browse the repository at this point in the history
  • Loading branch information
thomskaf committed Feb 18, 2017
1 parent b57279b commit cceacf9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Install via pip
foo/and/bar
>>> print(sort(["Banana", "Orange", "Apple", "Mango"], order="descending"))
['Orange', 'Mango', 'Banana', 'Apple']
>>> print(common_subsequences({"Lorem": "dummy", "Ipsum": "Dummy text"}, {"Lorem": "dummy", "Ipsum": "Dummy"}))
{'Lorem': 'dummy'}
>>> print(longest_common_subsequence("Python is named after Monty Python", "What is Python Used For ?"))
Python
>>> print(shortest_common_subsequence("Python is named after Monty Python", "What is Python Used For ?"))
is
>>> print(common_sub("Python is named after Monty Python", "What is Python Used For ?"))
['Python', 'is', 'Python']
>>> print(common_sub("Python is named after Monty Python", "What is Python Used For ?", sequence="shortest"))
is
>>> print(common_sub("Python is named after Monty Python", "What is Python Used For ?", sequence="longest"))
Python

0 comments on commit cceacf9

Please sign in to comment.