Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Handling single exception

#!/usr/bin/env python3

with open('input.txt', 'r') as myfile:
    for line in myfile:
        print(line)

print('Outside the with block')
Source by www.golinuxcloud.com #
 
PREVIOUS NEXT
Tagged: #Handling #single #exception
ADD COMMENT
Topic
Name
4+2 =