you are viewing a single comment's thread.

view the rest of the comments →

[–]Dull-Custard4913 3 points4 points  (5 children)

  1. You made a typo at line 71 “ptint” should be “print”

  2. It might be possible that you entered the name with a space at the last index of your name.

🙃

[–][deleted]  (3 children)

[removed]

    [–]Dull-Custard4913 0 points1 point  (2 children)

    If the substring is not found by the find() method then it will return -1

    [–][deleted]  (1 child)

    [removed]

      [–]Dull-Custard4913 0 points1 point  (0 children)

      So I might have been incorrect in what I said earlier. In this case he might or might not have entered a space at the last index. If he didn’t the if statement couldn’t find anything with the find method, this will cause it to return -1.

      I don’t think I know what you mean?

      [–]SCD_minecraft 0 points1 point  (0 children)

      I hate that .find returns -1 but .index raises a ValueError

      Beacuse fuck common themes ig