QuestionQ17Verified/StringsCopy linkReport a problemAsk AstroTutorSave questionWhat is the expected result of running the following code? Ait outputs 3Bit outputs 'None'Cit outputs 0Dit raises an exceptionShow AnswerAnswerExplanationThe loop copies every character from the string representation of 1/3 into dummy. Negative index -1 selects the final character of that string, which is 3, so the code prints 3.Show comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion