definitions = [
'Mechanical advantage is a measure of the force amplification achieved by using a tool, mechanical device or machine system. The device preserves the input power and simply trades off forces against movement to obtain a desired amplification in the output force. The model for this is the law of the lever. Machine components designed to manage forces and movement in this way are called mechanisms.[1] An ideal mechanism transmits power without adding to or subtracting from it. This means the ideal mechanism does not include a power source, is frictionless, and is constructed from rigid bodies that do not deflect or wear. The performance of a real system relative to this ideal.',
'Ein Kraftwandler ist eine mechanische Anordnung zur Veränderung einer Kraft in Bezug auf ihren Angriffspunkt, ihre Richtung oder ihren Betrag. Die einfachsten Kraftwandler sind Seile, Stangen, Rollen, schiefe Ebenen und Hebel. Dies sind gleichzeitig die grundlegenden einfachen Maschinen.',
'La ventaja mecánica es una magnitud adimensional que indica cuánto se amplifica la fuerza aplicada usando un mecanismo (ya sea una máquina simple, una herramienta o un dispositivo mecánico más complejo) para contrarrestar una carga de resistencia.',
'Cette notion s\'applique de manière évidente dans les systèmes de poulies et de leviers. Elle est centrale dans les systèmes de freinage : on applique une petite force sur un parcours important et l\'on obtient une force importante transmise au système de freinage pour une course de faible distance.'
]
for definition in definitions: # definition to pojedynczy element z listy definitions
words = definition.split(' ') # zmienna words to zbiór wszystkich definition z listy definitions podzielonych ze względu na spację
short_text = '' # zmienna short_text ma pustą wartość
counter = 0 # wartość zmiennej counter wynosi 0
for word in words: # word to pojedyncza wartość/element z listy words czyli z listy której wartości są podzielone ze względu na spację
short_text += word+' ' # short_text = short_text + word+spacja <--- tutaj word to pojedyncze słowa z listy words
counter += 1 # counter = counter + 1 <----- wartość counter zwiększa się o 1
if counter>=8: # jezeli counter jest większe lub równe 8 to:
print(short_text) # wyświetl wartość short_text
break # przerywa działanie pętli if i przechodzi do wewnętrznej pętli for <---Dobrze rozumiem?
# wynik to:
# Mechanical advantage is a measure of the force <----Skąd po wykonaniu tej lini program wie że ma zacząć następną linię od słowa Ein?
# Ein Kraftwandler ist eine mechanische Anordnung zur Veränderung <----Skąd po wykonaniu tej lini program wie że ma zacząć następną linię od słowa La?
# La ventaja mecánica es una magnitud adimensional que itd...
# Cette notion s'applique de manière évidente dans les
Dobrze rozumiem? Wszystkie komentarze ja pisałem, są tam pytania, stwierdzenia i moje spostrzeżenia :)
Edit: W dolnych komenatarzach mam pytanie dotyczące przechodzenia do następnej linijki.