News for hackers. Stuff that matters.
Re:Weekend projects: getting silly with C by jftuga on Monday July 01, 2024 @07:27AM (#40844709)
Thanks for this suggestion - it works great.

    import sys # run: python3 countdown.py 10
    def main(n:int): print(n) or n-1 and main(n-1)
    main(int(sys.argv[1]))
This also works and is definitely more Pythonic:

    _ = [print(n) for n in range(10,0,-1)]

There are no comments on this comment yet.