0
How to get the defined string printed?
def my_func(): print("spam") print("spam") print("spam") str("john") print(str()) my_func() how to get the string "John" gets printed?
3 Respuestas
+ 1
Instead of str("john") use
str="john"
print(str)
+ 1
yes, I agree with "Max Pickup." that would be the only way to print that string (firstly, you need to make it a string.)
- 2
I don't think you can.