Python Forum
getting a word from a list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting a word from a list
#1
I have to get a word which contains the longest word containing "e" from a list. how would I go about this a main function has not been provided. this function has been provided

def test_get_longest_e_word():
    print("1.", get_longest_e_word(["Melissa", "Jessie", "Kath", "Amity", "Raeann"]))
    print("2.", get_longest_e_word(["Jo", "Jessie", "Penelope", "Jin", "Raeann", "Pamelita"]))
    etc....
def get_longest_e_word(word_list):

Im having issues with defining word list how would i in the main function refer to to the test function
Reply


Messages In This Thread
getting a word from a list - by sheck33332 - May-07-2019, 12:34 PM
RE: getting a word from a list - by michalmonday - May-07-2019, 02:17 PM
RE: getting a word from a list - by sheck33332 - May-07-2019, 05:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  look at first letter in list and append word for assertion mapypy 3 2,078 Feb-06-2021, 05:45 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020