Created
October 16, 2022 19:05
-
-
Save adamoudad/1adffff9b85601d1de444ebe1b78e24d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(n): | |
try: | |
data = next(dataiter) | |
except ValueError: | |
continue | |
# The code here is ignored if ValueError is raised in the "try" block | |
# Otherwise, run the rest of the loop here ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment