Извиняюсь за возможную костыльность, но в целом код работатет.
one = input('Введите первую строку: ')
two = input('Введите вторую строку: ')
three = input('Введите третью строку: ')
l1 = len(one)
l2 = len(two)
l3 = len(three)
if l1 > l2 and l1 > l3 and l2 > l3:
print(three, two, one)
elif l1 < l2 and l1 > l3 and l2 > l3:
print(three, one, two)
elif l1 < l2 and l1 < l3 and l2 > l3:
print(two, three, one)
elif l1 < l2 and l1 < l3 and l2 < l3:
elif l1 > l2 and l1 > l3 and l2 < l3:
elif l1 > l2 and l1 < l3 and l2 < l3:
print(two, one, three)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Извиняюсь за возможную костыльность, но в целом код работатет.
one = input('Введите первую строку: ')
two = input('Введите вторую строку: ')
three = input('Введите третью строку: ')
l1 = len(one)
l2 = len(two)
l3 = len(three)
if l1 > l2 and l1 > l3 and l2 > l3:
print(three, two, one)
elif l1 < l2 and l1 > l3 and l2 > l3:
print(three, one, two)
elif l1 < l2 and l1 < l3 and l2 > l3:
print(two, three, one)
elif l1 < l2 and l1 < l3 and l2 < l3:
print(three, two, one)
elif l1 > l2 and l1 > l3 and l2 < l3:
print(two, three, one)
elif l1 > l2 and l1 < l3 and l2 < l3:
print(two, one, three)