summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2015-10-15 13:03:30 -0500
committerLevi Bostian <levi.bostian@gmail.com>2015-10-15 13:03:30 -0500
commitc2b7b81fe40f79b93660d06f0f82c7e8c9235fa1 (patch)
tree95a1952c73fa0efc0e072366f5ee5d4356e20d4f /python3.html.markdown
parent560b93d109595d49f7ceb2e5615e33a822dbbdee (diff)
parenta8b32c362bccedf01aa7bac0b77eff8f16c88482 (diff)
Merge pull request #1514 from ankitaggarwal011/python3-input-operations-add
[python3/en] Added instructions on how to perform input operations
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown4
1 files changed, 4 insertions, 0 deletions
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