From a8b32c362bccedf01aa7bac0b77eff8f16c88482 Mon Sep 17 00:00:00 2001 From: Ankit Aggarwal Date: Wed, 14 Oct 2015 21:16:18 +0530 Subject: Added instructions for input operations in Python3 --- python3.html.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python3.html.markdown b/python3.html.markdown index f3f4dd37..a1125c73 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -160,6 +160,10 @@ print("I'm Python. Nice to meet you!") # => I'm Python. Nice to meet you! # Use the optional argument end to change the end character. print("Hello, World", end="!") # => Hello, World! +# Simple way to get input data from console +input_string_var = input("Enter some data: ") # Returns the data as a string +# Note: In earlier versions of Python, input() method was named as raw_input() + # No need to declare variables before assigning to them. # Convention is to use lower_case_with_underscores some_var = 5 -- cgit v1.2.3