

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What does input() function do in python?
The function input() presents a prompt to the user (the optional arg of raw_input([arg])), gets input from the user. In Python 2.x, it returns the data input by the user in a format that is interpreted by python. For example, if the user inputs "Hello", it is stored as string while if a user enters 5, it is interpreted as an int. In Python 3.x, it returns the data input by the user in string format.
For example
name = raw_input("What is your name? ") print "Hello, %s." % name
- Related Questions & Answers
- What does raw_input() function do in python?
- What does print() function do in Python?
- What does open() function do in Python?
- What does close() function do in Python?
- What does reload() function do in Python?
- What does os.pipe() function do in Python?
- What does getattr() function do in Python?
- What does hasattr() function do in Python?
- What does setattr() function do in Python?
- What does delattr() function do in Python?
- What does the repr() function do in Python Object Oriented Programming?
- What does the str() function do in Python Object Oriented Programming?
- What does the cmp() function do in Python Object Oriented Programming?
- What does the .end() function do in jQuery?
- What does a +function() { } notation do in JavaScript?
Advertisements