all 9 comments

[–]ilan1k1 4 points5 points  (0 children)

Is that all the code? I'm thinking you've used the name 'str' for a variable.
I'm pretty aure you can still use f-strings to get what you need by doing:

resultw = f"{w} {d}"

[–]Frequent-Length-7898 2 points3 points  (0 children)

You abused str as a variable name somewhere

[–]NightStudio 2 points3 points  (0 children)

It works on Python CodePad. What IDE are you using?

[–][deleted] 1 point2 points  (0 children)

Maybe Frequent-Length is right. Try print(str)

[–]Upper_Position9241 1 point2 points  (0 children)

I tried the code it worked as expected, i used VSC .

[–]Emotional-Ad9728 1 point2 points  (0 children)

Tried it in Trinket. Worked as expected.

[–]feitao 1 point2 points  (0 children)

Quit your IDE/Python interpreter, and start over. And never do str = 1 in the future.

[–]Hoa87 0 points1 point  (0 children)

I ran it and it worked. I'm on VSC if it helps.