0
What is the purpose of the parentheses after the input function
name = input() print(name)
4 odpowiedzi
+ 1
print is a function.
print(name) is a function call.
input is a function.
input() is a function call.
Try entering a string argument into the parentheses and see what happens. For example:
name = input("What is your name?")
+ 5
Hi Alexandre NAROLLES / Solutionist Thinker
In Python a function is called with parentheses. Inside it you can put arguments, if the function allow it.
In Python input is a function, and not a statement. You can read about it by running:
help(input)
+ 1
The purpose is that you can add some text before the cursor.