Designed by IITian's, only for AI Learners.
New to InsideAIML? Create an account
Employer? Create an account
Open a text file from PC and find the longest word in the text file and find the length.
with open(filename, 'r') as infile:
words = infile.read().split()
max_len = len(max(words, key = len))
return [word for word in words if len(word) == max_len]
Running random forest algorithm with one variable