10000 Simplify ch 13 second challenge solution · arbi11/python-basics-exercises@a201407 · GitHub
[go: up one dir, main page]

Skip to content

Commit a201407

Browse files
committed
Simplify ch 13 second challenge solution
1 parent 1bac150 commit a201407

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ch13-interact-with-pdf-files/7-challenge-unscramble-a-pdf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ def get_page_text(page):
2121

2222
for page in pages:
2323
rotation_degrees = page["/Rotate"]
24-
if rotation_degrees < 0:
25-
page.rotateClockwise(-rotation_degrees)
26-
elif rotation_degrees > 0:
24+
if rotation_degrees != 0:
2725
page.rotateCounterClockwise(rotation_degrees)
2826
pdf_writer.addPage(page)
2927

0 commit comments

Comments
 (0)
0