I have the following code:
with open(path, 'r') as f:
data = f.readlines()
print("x "+ data[1] + "y")
data[1]
is the string from txt file. The result that I get:
>>> x 10
>>> y
but I would like "y" to be in the same line with "x 10". Is it possible to do in Python?
Thank you in advance!