Oct-23-2018, 01:06 PM
I started to learn how to open files up in PyCharm; however, the file will 'open' using open(), but then nothing else in the program will execute. Not a 'for loop' or even a print('hey'). Does anyone know why? I'm trying to get through a homework exercise, but I am getting hung up on this problem. Thanks for your help!
INPUT:
OUTPUT:
INPUT:
1 2 3 4 |
fname = input ( "/Users/Earth/Downloads/textfile.txt" ) fh = open (fname) print ( 'hey' ) |
1 |
/ Users / Earth / Downloads / textfile.txt |