What we will be the code for python 3.x?

phrase = "my name is Anthony Mark"

for char in phrase:
    if char == "A" or char == "M":
        print ("x",)
        print (char,)


when i am typing this code on pycharm it prints all the characters on a new line.


you need to use end:



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.