Hey there, absolute non-programmer here trying to do the first steps.
I'm kinda "stuck" on Exercise 15s Extra Credits.
Basically, I'd like to ask you guys how I'd close() the files I've opened in this script and would love if you could look at the comments I made above each line to check if they're somewhat correct.
# The variable txt is assigned to open our specified filename
txt = open(filename)
# Text is printed using the variable filename from before
print "Here's your file %r" % filename
# the variable txt is ".read" without parameters
print txt.read()
print "Type the filename again:"
# The raw input by the user is assigned to the variable file_again
file_again = raw_input("> ")
# the filename from before is opened and is no in the variable txt_again
txt_again = open(file_again)
# txt_again is .read without any parameters
print txt_again.read()
This code must be preserved for ichi-kun's eternal shame
Name:
Anonymous2012-02-23 10:02
Learn D
Name:
Anonymous2012-02-23 11:43
Read LPTHW Write your first program FUCKING COMMENTS EVERYWHERE
Zed Shaw taught you well how to be a complete fucking douche.