Skip to content

Instantly share code, notes, and snippets.

@ashutoshpipriye
Last active May 27, 2020 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashutoshpipriye/83aeb146a8bf99ed0029381fdc4c8d36 to your computer and use it in GitHub Desktop.
Save ashutoshpipriye/83aeb146a8bf99ed0029381fdc4c8d36 to your computer and use it in GitHub Desktop.
# Write code to assign the number of characters in the string rv to a variable num_chars.
rv = """Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
'Tis some visitor, I muttered, tapping at my chamber door;
Only this and nothing more."""
# Write your code here!
num_chars = 0
for i in rv:
num_chars = num_chars + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment