<jupyter_start><jupyter_text><jupyter_code>'''
# TODO: Define a word as a sequence of consecutive English letters. Find the longest word from the given string.

# e.x.

input = "You are the best!!!!!!!!!!!! CodeFighter ever!"
expected_output = CodeFighter

'''
text1 = "Ready, steady, go!"
text = "You are the best!!!!!!!!!!!! CodeFighter ever!"
# split the sequence into each word without comma, whitespace and special characters.
import string
def longestWord(sequence):
    list_of_split_word = [word.strip(string.punctuation) for word in sequence.split()]
    longest_word = max(list_of_split_word, key=len)
    return longest_word
# test
longestWord(text)
# test 
longestWord(text1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12412831241283125, 'fraction_numerical': 0.002789400278940028, 'mean_word_length': 5.648148148148148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '318498', 'license': 'MIT', 'n_tokens_mistral': 226, 'n_tokens_neox': 223, 'n_words': 72, 'path': 'longestWord.ipynb', 'repo_name': 'maithoi/CodeSignal', 'size': '717'}