Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. from sys import argv # This module allows the user to input a name for a file to open
  2.  
  3. script, filename1 = argv
  4.  
  5. txt = open(filename1) # This allows txt to be assigned to open(filename1)
  6.  
  7. print txt.read() # This string allows the txt file to be read. because txt = open(filename) that particular txt document will now pint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement