Doubt about the print statement

why is %i written in the print statement
i.e. print(“Step %d”%i)

I have tried to explain the use of string formatting in the above link using some small snippets of code .You can refer to them to learn about this concept of using % to format strings. But in case you still have any doubt about this topic then do let me know by replying to this thread and I will try to further explain this concept to you.
Also 1 more thing about the same topic-
%s is used to format strings , %d is used for integers and %f is used for float

1 Like

ok so it working like in c we do a=10, printf(“hello %d”,a)
just to link the calling to the variable.
thank got it.