Variable assignments prints out output
Well, when you assign something to a variable in Python:
a = 1
nothing visible happens, nothing is printed out.
But in this case:
import ftplib
ftp = ftplib.FTP("igscb.jpl.nasa.gov")
ftp.login()
a=ftp.retrlines('LIST')
When the last line is executed, this is printed out:
d--X--X--X--X 2 0 0 4096 Nov 29 2001 bin
d--X--X--X--X 2 0 0 4096 Nov 29 2001 etc
which is the information related to the FTP directory.
How comes that a variable assignment yields an output?
No comments:
Post a Comment