Browse code

Cleaned up a bit

haywalk authored on 23/01/2020 00:15:39
Showing 1 changed files

... ...
@@ -17,11 +17,10 @@ for let in romanNum:
17 17
 for part in parts:
18 18
 	ind = parts.index(part)
19 19
 	
20
-	# If not at the end & number is greater than next index, subtract it
21
-	if ind != len(parts) - 1:
22
-		if part < parts[ind + 1]:
23
-			num -= part
24
-			continue
20
+	# If not at the end && number is less than next index: subtract it
21
+	if (ind != len(parts) - 1) and (part < parts[ind + 1]):
22
+		num -= part
23
+		continue
25 24
 
26 25
 	# Otherwise add the number
27 26
 	num += part