(n)
return nums[-1]
Test that the first few practical nos are generated correctly.
Test that the first few practical nos are generated correctly.
Test that the first few practical nos are generated correctly .
def main(n):
    """Test that the first few practical nos are generated correctly."""
    # G = PracticalNumbers()
    # for p in [1,2,4,6,8,12,16,18,20,24,28,30,32,36]:
        # self.assertEqual(p,G.next())
    # nums = []
    # for i in range(10):
    # 	nums.append(next(G))
    # print(nums)

    nums = []
    for num in PracticalNumbers():
        nums.append(num)
        if len(nums) == n:
            break;

    return nums[-1]
def main ( n ) : # G = PracticalNumbers() # for p in [1,2,4,6,8,12,16,18,20,24,28,30,32,36]: # self.assertEqual(p,G.next()) # nums = [] # for i in range(10): # 	nums.append(next(G)) # print(nums) nums = [ ] for num in PracticalNumbers ( ) : nums . append ( num ) if len ( nums ) == n : break return nums [ - 1 ]