Skip to content

Commit 1cf9d16

Browse files
author
Doug Mahugh
committed
use enumerate() to simplify the loop
1 parent f35f571 commit 1cf9d16

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

osinfo.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,5 @@
2727
platform.uname(),
2828
platform.version(),
2929
]
30-
i=1
31-
for item in profile:
30+
for i, item in enumerate(profile, 1):
3231
print '#',i,' ',item
33-
i=i+1;

0 commit comments

Comments
 (0)