I am a Python beginner and need to clean up and simplify this code but I have no clue how to, so any feedback would be appreciated!
print ("Type in four inputs.") word_first = raw_input("What is your first input? ") word_second = raw_input("What is your second input? ") word_third = raw_input("What is your third input? ") word_fourth = raw_input("What is your fourth input? ") list_of_words = [word_first, word_second, word_third, word_fourth] print print sorted(list_of_words, key=len) def average(numbers): return sum(numbers)/len(numbers) all_words = word_first, word_second, word_third, word_fourth words_total = word_first, word_second, word_third, word_fourth.split() length_words = [len(word) for word in words_total] word_first_length = len(word_first) word_second_length = len(word_second) word_third_length = len(word_third) word_fourth_length = len(word_fourth) total_letters = word_first_length + word_second_length + word_third_length + word_fourth_length average_length = total_letters / 4 print print ("Shortest input is: ") + (min((word for word in list_of_words if word), key=len)) print ("Average length is %.1f.") %(average_length)
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
99,9% servers uptime
No usage restrictions
Perfect for SEO
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!