Skip to content

Instantly share code, notes, and snippets.

@santosadrian
Created February 3, 2020 14:46
Show Gist options
  • Save santosadrian/80c0268a14acf19ac40474da5f2f39bb to your computer and use it in GitHub Desktop.
Save santosadrian/80c0268a14acf19ac40474da5f2f39bb to your computer and use it in GitHub Desktop.
Example 15
from sys import argv# Imports module argv from library sys
script, filename = argv# get and set script and filename variables from user input
txt = open(filename)# set variable txt with a function
print(f"Here's your file {filename}")# This prints a sentence and a variable print(f"bla {variable"}
print(txt.read()) # this print a call to a function (read)
print("Type the filename again:")# print a string
file_again = input("> ")# defines a variable file_again that gets the value from user input
txt_again = open(file_again)# defines the variable txt_again to a function or method
print(txt_again.read())# prints in screen a variable that is a function
@palekyi
Copy link

palekyi commented Feb 3, 2020

please give code for microsoft office 2016.

@santosadrian
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment