On 10/6/2016 10:15 AM, Zeel Solanki wrote:
raw_input() always returns a string. When you enter a number (say, 5) it will be a string ("5").def filter_long_words(words, n): for x in words.split(): return filter(lambda x: len(x) > n, words)print filter_long_words(raw_input("Enter a list of words with spaces in between."), raw_input("Enter a number."))
use int() to convert that string to numeric. _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
