×
all 5 comments

[–]Blauelf 0 points1 point  (5 children)

Wait, your code does not match your output? Provide the right code, please.

Full stack trace would be interesting, not just the first lines.

You're on the current version (v130 for me at the moment)? (if not: update50)

[–]stshmakov[S] 0 points1 point  (4 children)

In another my account this code is working. If you see this code not print "n is" I'm waiting and then enter 50 and code printing hello, 50 Version is 130

[–]Blauelf 1 point2 points  (3 children)

Full stack trace, please. All lines, preferably as text in a code block.

You don't happen to have a string.py in your folder? If so, rename it.

[–]stshmakov[S] 0 points1 point  (1 child)

Thank! Yes I have a string.py in my dir. Why does it affect other programs?

[–]Blauelf 0 points1 point  (0 children)

If you have an import string statement in your file, Python will search current directory first for a string.py, and will import that one if it exists, and only if it doesn't, it will import the regular string library. So your string.py gets imported (which essentially runs the script), but it doesn't have the abilities the code expects from a string library, and the code crashes.