Syntax error in Python 3.6 using ,end"" -
my code reads:
print("please key in word: ",end" ") first=input() print("and key in another: ",end" ") second=input() print("you have typed: "+first+" "+second)
but result "syntaxerror: invalid syntax" , ^ pointing second " following end. using python 3.6, end notation should correct. have tried , without space between "" after end. can see i'm going wrong?
keywords need assigned values using =
:
print("please key in word: ", end=" ") first = input()
however, better way use input()
directly:
first = input("please key in word: ")
Comments
Post a Comment