Last active
July 27, 2017 15:59
-
-
Save rostyq/96bdd460ab2dbf8d130fcc5a01f326f9 to your computer and use it in GitHub Desktop.
Exercise on www.practicepython.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = input("Input a number: ") | |
num = int(num) | |
rng = range(1,num+1) | |
new_rng = [i for i in rng if num % i ==0] | |
print(new_rng) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment