The code seems to work with both, but perhaps one of these is deprecated…?
def get_squares(upper_range: int) -> Iterable[int]: return (x**2 for x in range(upper_range + 1)) for i in get_squares(10): print(i)
submitted by /u/pachura3
[link] [comments]
r/learnpython The code seems to work with both, but perhaps one of these is deprecated…? def get_squares(upper_range: int) -> Iterable[int]: return (x**2 for x in range(upper_range + 1)) for i in get_squares(10): print(i) submitted by /u/pachura3 [link] [comments]
The code seems to work with both, but perhaps one of these is deprecated…?
def get_squares(upper_range: int) -> Iterable[int]: return (x**2 for x in range(upper_range + 1)) for i in get_squares(10): print(i)
submitted by /u/pachura3
[link] [comments]