/  Input() method in Python Built in Function

Input() method in Python Built in Function

 

input method in built in function returns the string which was converted by reading the line form the input.

 

Syntax:

Input([prompt])

 

Parameters:

Input method has single parameter

  • Prompt: this is an optional parameter. It is a string that is written to the output without trailing the new line.

 

Example-1:

print("Enter your favourite place:")
x = input()
print("Welcome to , " + x)

 

Output:

Input () method in Python Built in Function

Input () method in Python Built in Function