-1

I am trying to write a message to the user that contains a tuple and string something like

(0,0) what is your move: i tried the following:

x= input((0,0)+ "what is your move: ") cant concatenate str with tuple

x= input((0,0), "what is your move: ") input takes a max of 1 arg

x= input(((0,0), "whats your move))" result: (0,0) whats your move: )

Reddevil
  • 125
  • 3
  • 12

1 Answers1

2

You have to convert the tuple to a string first:

x = input(str((0,0)) + " what is your move: ")

Though it would be cleaner to use the str.format method:

x = input("{} what is your move: ".format((0,0)))
wjandrea
  • 28,235
  • 9
  • 60
  • 81