Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def unosReci():
- reci = input()
- reci = reci.split("-")
- for i in reci:
- if not i.isalnum():
- return []
- return reci
- def obrada(reci):
- rezultat = ""
- for rec in reci:
- temp = ""
- mala_slova = []
- for i in rec:
- if i.isalpha() and i.islower():
- temp += i
- elif len(temp) != 0:
- mala_slova.append(temp)
- temp = ""
- if len(temp) != 0:
- mala_slova.append(temp)
- if len(mala_slova) != 0:
- maks = mala_slova[0]
- for i in mala_slova:
- if len(i) >= len(maks):
- maks = i
- rezultat += maks
- return rezultat
- reci = unosReci()
- rezultat = obrada(reci)
- print(rezultat, end="")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement