myvar = "How are you ?"
print("%s %s") % (hello, myvar)
Its one of my python Task for University but it doesnt work ?? I use Python 3 could it be for 2 ?? And how would it look like for 3 then ?
myvar = "How are you ?"
print("%s %s") % (hello, myvar)
Its one of my python Task for University but it doesnt work ?? I use Python 3 could it be for 2 ?? And how would it look like for 3 then ?
You should move it inside brackets
print("%s %s" % (hello, myvar))
as in your case "%" is used in the context "NoneType tuple", while it should be used in a context "str tuple"
In python3, the print is a function unlike in python 2 where it is actually a statement.
so, as it is told, in python3 give the argument inside () ie
print(hello, myvar)