-4

As I join 2 strings like:

print("not" + "X")

The result is like this:

notX

How could I make this into:

not X
mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • A simple `print("not", "x")` will do as [`print`](https://docs.python.org/3/library/functions.html#print) can take multiple argumetns to print and has a `sep` argument to separate them which defaults to a space `" "`... – Tomerikoo Apr 10 '20 at 09:13

1 Answers1

1

Try using:

print("not","X")
# or:
' '.join(i for i in ['not','X'])
# or:
' '.join(('not','X'))

instead of:

print("not"+"X")
Joshua Varghese
  • 5,082
  • 1
  • 13
  • 34