Skip to Main Content
Python Rusz głową! Wydanie II
book

Python Rusz głową! Wydanie II

by Paul Barry
November 2017
Intermediate to advanced content levelIntermediate to advanced
578 pages
23h 17m
Polish
Helion
Content preview from Python Rusz głową! Wydanie II
92
Rozdział 2.
Kod
vowels = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’]
word = “Miliard”
for letter in word:
if letter in vowels:
print(letter)
Pierwsza wersja programu
vowels, wyświetlająca
WSZYSTKIE samogłoski
z listy, które da się znaleźć
w słowie „Miliard” (włącznie
z duplikatami).
vowels = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’]
word = “Miliard”
found = []
for letter in word:
if letter in vowels:
if letter not in found:
found.append(letter)
for vowel in found:
print(vowel)
Program vowels2.py
zawiera dodatkowy kod,
w którym używana jest lista
umożliwiająca wyeliminowanie
duplikatów. Program ten
wyświetla listę unikatowych
samogłosek znalezionych
w słowie „Miliard” i należących ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python. Receptury. Wydanie III

Python. Receptury. Wydanie III

David Beazley, Brian K. Jones
Python. Programuj szybko i wydajnie

Python. Programuj szybko i wydajnie

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9788328337343