Загрузка...

Python Continue Statement Explained | Skip Letters in a Loop

Description:
In this beginner Python tutorial, I show you how the continue statement works inside a for loop.

We build a simple program that asks the user for a word, then prints every letter except the letter “a”. This is a great way to understand how continue skips part of the loop and moves to the next item.

In this video you’ll learn:
• How for loops work in Python
• What the continue statement does
• How to skip certain values in a loop
• A simple beginner-friendly example

Code used in the video:

for letter in word:
if letter == “a”:
continue
print(letter)

#Python #PythonTutorial #PythonBeginner #ForLoop #continuestatement

Видео Python Continue Statement Explained | Skip Letters in a Loop канала CAPE AOC
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять