(Mar-15-2020, 08:06 AM)Larz60+ Wrote: why not:What I'm Trying To Achieve Is Jumping And Input Methods And Not Finding Longest Word.
>>> words = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum" >>> wordlist = words.split() >>> print(f"The longest word in the list is {max(map(len, wordlist))} characters") The longest word in the list is 13 characters >>>
(Mar-15-2020, 10:36 AM)ndc85430 Wrote: What's with the weird capitalisation of every word in your posts? It does make them more difficult to read.Ok
(Mar-15-2020, 10:04 AM)buran Wrote:(Mar-15-2020, 09:58 AM)WhamDie Wrote: Yeah Just A Matter Of HabitYeah, that's exactly what I mean - get rid of that habbit. It will help you both in short-term (more people will look at your code and likely to help) and long-term - you will have maintainable code and be better programmer.
It Became A Habit When I Used To Make Mods For Games 3 Years Ago And Other Modders Would Decompile My Scripts And Steal Codes. This Is A Homework Or Else I'd Have Written It In Such A Manner It'd Take You Years To Understand
![Big Grin Big Grin](https://python-forum.io/images/smilies/biggrin.png)
![Big Grin Big Grin](https://python-forum.io/images/smilies/biggrin.png)
Anyway, Can You Help Me With The Code?