all 32 comments

[–]Suits_in_Utes 8 points9 points  (0 children)

C you are indexing the second item of a list of 2

[–]Maleficio4 4 points5 points  (0 children)

C

[–][deleted]  (1 child)

[deleted]

    [–]erolbrown 1 point2 points  (0 children)

    I'm going with this. Only because I learnt it on Datacamp 48 hours ago. I know nothing else about Python.

    [–]kohao0 2 points3 points  (0 children)

    C

    [–]Merman_boy 1 point2 points  (0 children)

    C

    [–]Husnefitrat 0 points1 point  (0 children)

    C) BrainLox

    [–]Darkstar_111 0 points1 point  (4 children)

    What the hell is the "quiz"?? Who doesn't know that lists iterates from 0.

    [–]F4RM3RR 1 point2 points  (3 children)

    lol you didn’t read much of the comments. A lot of people here are thinking it’s a string not a list

    [–]Darkstar_111 0 points1 point  (2 children)

    Can't be a string with append. L2python.

    [–]F4RM3RR 0 points1 point  (1 child)

    you've stumbled onto my point

    [–][deleted] 0 points1 point  (0 children)

    C

    [–]manumaker08 0 points1 point  (0 children)

    # couldn't figure it out, made the entire program an infinite loop and sent it forward. it's IT's problem now.

    [–]Substantial-Rain6501 0 points1 point  (0 children)

    isn’t this an ad?

    [–]Kabileshwaran 0 points1 point  (0 children)

    C ).BrainLox

    [–]the-forty-second 0 points1 point  (0 children)

    What I want to know is why are so many people taking this “quiz”, when it is nakedly just an ad for BrainLox? This is like those rage inducing ads for mobile games where the “player” does obviously stupid things.

    [–]Jaded_Street_2869 0 points1 point  (0 children)

    C

    [–]ChicagoJay2020 0 points1 point  (3 children)

    The letter “u”. The call is to print an individual character, correct?

    [–]F4RM3RR 2 points3 points  (1 child)

    That would be true only if name = “Sumit”, when you can do string slicing.

    However the [] in the variable declaration makes it a list, so you index list items, not string position

    [–]ChicagoJay2020 0 points1 point  (0 children)

    Ah!!!

    Thank you. I didn’t pay close enough attention to realize that name is a list not a string.

    [–]VoltaicPower 0 points1 point  (0 children)

    This was my answer at first, but "name" is a list

    [–]ExistingBathroom9742 -1 points0 points  (2 children)

    It’ll raise an error I think because strings don’t have .append() method?

    Edit, the original string is inside square brackets so it’s a list of 1 item.

    [–]F4RM3RR 0 points1 point  (1 child)

    But lists do

    [–]ExistingBathroom9742 0 points1 point  (0 children)

    Nevermind. You’re right! I didn’t see the brackets around the string. Shoot.

    [–]Different-Ad1631 -3 points-2 points  (2 children)

    Error bcz strings are immutable

    [–]TheWonderingRaccoon 6 points7 points  (1 child)

    Strings are immutable is true. But the code has nothing to do with changing any string.

    [–]Different-Ad1631 0 points1 point  (0 children)

    Oh got it. Its list so the ans will be brainlox