Skip to content

Commit ccbd0d2

Browse files
committed
Fixed the return statement and improved syntax
1 parent 1de9ed7 commit ccbd0d2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

maths/special_numbers/disarium_number.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ def is_disarium(num):
1515
total += int(i) ** position
1616
position += 1
1717

18-
if total == num:
19-
return True
20-
else:
21-
return False
18+
return total == num
2219

2320

2421
if __name__ == "__main__":

0 commit comments

Comments
 (0)