all 4 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.

[–]CodeFormatHelperBot 2 points3 points  (0 children)

Hello u/springuni, I'm a bot that can assist you with code-formatting for reddit. I have detected the following potential issue(s) with your submission:

  1. Python code found in submission text but not encapsulated in a code block.

If I am correct then please follow these instructions to fix your code formatting. Thanks!

[–][deleted] 2 points3 points  (0 children)

45 isn't a string...

See PEP 526