mirror of
				https://github.com/pocketpy/pocketpy
				synced 2025-10-31 08:50:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			147 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			147 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| a = [1, 2, 3]
 | |
| a = iter(a)
 | |
| 
 | |
| total = 0
 | |
| 
 | |
| while True:
 | |
|     obj = next(a)
 | |
|     if obj is StopIteration:
 | |
|         break
 | |
|     total += obj
 | |
| 
 | |
| assert total == 6
 |