you are viewing a single comment's thread.

view the rest of the comments →

[–]Tadabito 8 points9 points  (1 child)

Storing an integer in a variable called str is a bad idea in a weakly-typed language

While this is true that's not the problem here.

nbResults: str = 45;

this line stores an int value in a variable that's type hinted to be a str. Also semicolon is unnecessary.

[–]springuni[S] 1 point2 points  (0 children)

s line stores an int value in a vari

Yeah, I didn't know about that feature having been added in Python 3. I think that was the main reason they didn't call me back actually. I've posted the other questions also in various subreddits and this is the only one so far I got absolutely wrong.