Return multiple values from function in Python | Codersarts

preview_player
Показать описание
#shorts #python #coding #programming #pythondeveloper
Рекомендации по теме
Комментарии
Автор

Could you explain please why there is no else after the if condition? It only says return, without else

def fact(x):
if x == 0:
return 1
return x * fact(x - 1)

x = int(input('Enter 4: '))
print(fact(x))

liri
welcome to shbcf.ru