Uncategorized

Write a one-line Python generator expression that returns an infinite sequence of increasing integers


Write a one-line Python generator or iterator expression that returns the infinite sequence of increasing integers generated by repeatedly adding the ascii values of each letter in the word “Close” to itself. 67, 175, 286, 401, 502, 569, 677, 788, 903 is the beginning of this sequence. Assume any needed Python standard library modules are already imported.

This is for learning purposes. I am having difficulty coming up with a solution.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *