calthoff / tstp

This is an old repository for the exercises in "The Self-Taught Programmer." Please see /selftaught.
166 stars 193 forks source link

Linked answers to challenges do not work (Chapter 6) #11

Open mullaney opened 7 years ago

mullaney commented 7 years ago
  1. Use a method to make the string "aldous Huxley was born in 1894." grammatically correct by capitalizing the first letter in the sentence.

The code you provide produces this:

Aldous Huxley Was Born In 1894. He Was Born In The United Kingdom.

not

Aldous Huxley was born in 1894.

  1. Take the string "Where now? Who now? When now?" and call a method that returns a list that looks like: [" Where now?", "Who now?", "When now?"].

The code you provide produces:

['Where now', ' Who now', ' When now', '']

not

[" Where now?", "Who now?", "When now?"]

LeRoyLippy commented 6 years ago

I 2nd this. Using split seems to not only remove the character being used to split, but retains the character in the print result.

Tico46 commented 6 years ago

3rd this! Also just posted an issue with the next problem as well.