summaryrefslogtreecommitdiffhomepage
path: root/ru-ru/python-ru.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'ru-ru/python-ru.html.markdown')
-rw-r--r--ru-ru/python-ru.html.markdown9
1 files changed, 9 insertions, 0 deletions
diff --git a/ru-ru/python-ru.html.markdown b/ru-ru/python-ru.html.markdown
index a0e2b474..162675bb 100644
--- a/ru-ru/python-ru.html.markdown
+++ b/ru-ru/python-ru.html.markdown
@@ -238,6 +238,15 @@ d, e, f = 4, 5, 6
# Обратите внимание, как легко поменять местами значения двух переменных
e, d = d, e # теперь d == 5, а e == 4
+#take input of integers in a single line
+#if input 1 2 3
+input = map(int,raw_input().split()) #integer
+
+input #=>[1, 2, 3]
+
+input = map(str,raw_input().split()) #string
+
+input #=>['1', '2', '3']
# Словари содержат ассоциативные массивы
empty_dict = {}