Hi
I need to Write a function which takes as input two strings and count how many words are both in the two
strings. Display the results sorted according the length of the word (longer first) and in case of
equality by the alphabetical order?
tony75
10
Newbie Poster
Recommended Answers
Jump to PostWhat have you got so far?
Jump to PostTry ...
wordlist.sort()
then ...
wordlist.sort(key=len)
All 8 Replies
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
tony75
10
Newbie Poster
snippsat
661
Master Poster
tony75
10
Newbie Poster
snippsat
661
Master Poster
tony75
10
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.