Skip to content

Instantly share code, notes, and snippets.

@mayankdawar
Created March 16, 2020 10:07
Show Gist options
  • Save mayankdawar/70531e86d29aba9825e102761a1e7248 to your computer and use it in GitHub Desktop.
Save mayankdawar/70531e86d29aba9825e102761a1e7248 to your computer and use it in GitHub Desktop.
Using the file school_prompt2.txt, find the number of characters in the file and assign that value to the variable num_char.
#Using the file school_prompt2.txt, find the number of characters in the file and assign that value to the variable num_char.
fil = open("school_prompt2.txt","r")
consts = fil.read()
num_char = len(consts)
fil.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment