Saturday, March 19, 2016

Python - Taking input from user

Taking input from user is a very common task and all programming languages support this. In this post, we will look into how we can do this in Python. A very simple program

#!/usr/bin/python


# Take the input entered by user in inputString
inputString = raw_input('Please Enter your name: ')

#print the string back

print('Welcome ' + inputString)

Simple is beautiful

No comments:

Post a Comment