Nov-04-2019, 02:02 PM
As stated - this is only Python 3.8 compatible code (using walrus operator).
Task can be described: 'collect user input until break and find longest input'
So
Task can be described: 'collect user input until break and find longest input'
So
# assign empty list to a name where user input will be collected # while True loop - executes until 'break' encountered in the body of loop # assign name to user input # check if user input is break symbol or word, if so - break loop # append answer to list of collected inputs # print max value by length in list
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.