fork download
  1. def is_odd(num:int):
  2. return num % 2
  3.  
  4. result = []
  5. for i in range(1000):
  6. nums = map(int, str(i))
  7. if all(map(is_odd, nums)):
  8. result.append(i)
  9. print(result)
Success #stdin #stdout 0.04s 9440KB
stdin
Standard input is empty
stdout
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 31, 33, 35, 37, 39, 51, 53, 55, 57, 59, 71, 73, 75, 77, 79, 91, 93, 95, 97, 99, 111, 113, 115, 117, 119, 131, 133, 135, 137, 139, 151, 153, 155, 157, 159, 171, 173, 175, 177, 179, 191, 193, 195, 197, 199, 311, 313, 315, 317, 319, 331, 333, 335, 337, 339, 351, 353, 355, 357, 359, 371, 373, 375, 377, 379, 391, 393, 395, 397, 399, 511, 513, 515, 517, 519, 531, 533, 535, 537, 539, 551, 553, 555, 557, 559, 571, 573, 575, 577, 579, 591, 593, 595, 597, 599, 711, 713, 715, 717, 719, 731, 733, 735, 737, 739, 751, 753, 755, 757, 759, 771, 773, 775, 777, 779, 791, 793, 795, 797, 799, 911, 913, 915, 917, 919, 931, 933, 935, 937, 939, 951, 953, 955, 957, 959, 971, 973, 975, 977, 979, 991, 993, 995, 997, 999]