[Solved] Why am I getting two diferent outputs with my python code? [closed]

[ad_1]

That’s because in your second code you’re re-assigning r back to the empty string ''. Thus you only get the final character multiplied 3 times (which for Mississippi is i).

[ad_2]

solved Why am I getting two diferent outputs with my python code? [closed]