Files
learning/python/циклы/for.py
2022-05-06 00:49:26 +03:00

10 lines
482 B
Python
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#Здесь переменная f объявляется сразу в цикле
#В данном цикле f присваивается каждый элемент из множества символов, заданных после in
for f in 'Hi!':
print (f * 2)
#for с числами. Последнее число не обрабатывается: будет идти от 10 до 19
#range (Старт, финиш, шаг)
for k in range(10, 20):
print (k)