DEV Community

Discussion on: 30 Days of Python 👨‍💻 - Day 15 - Generators

Collapse
pvojnisek profile image
pvojnisek

really nice tutorial, thank you!
You can replace

    temp = a
    a = b
    b = temp + b
Enter fullscreen mode Exit fullscreen mode

with

    a, b = b, a + b
Enter fullscreen mode Exit fullscreen mode
Collapse
arindamdawn profile image
Arindam Dawn Author

Thanks for the suggestion. I just kept it more verbose :)