Learning Python: The Ultimate Guide for Beginners to Coding with Python with Useful Tools


Using While Loop Condition with Dictionaries and Lists



Download 2,02 Mb.
Pdf ko'rish
bet106/126
Sana01.01.2022
Hajmi2,02 Mb.
#285662
1   ...   102   103   104   105   106   107   108   109   ...   126
Bog'liq
Learning Python The Ultimate Guide for Beginners to Coding with

Using While Loop Condition with Dictionaries and Lists
So far, you have only worked on the user requests for information at a time.
Once the user enters their response, the response is printed out. However,
how can you keep track if we have numerous users and information? Well,
in this situation, you will need to use the while loop in dictionaries and lists.
An effective way of looping through a list is using a “for loop” conditional
statement.  However,  don’t  try  to  change  a  list  contained  in  a  “for  loop”
because it will be hard for Python to keep track of the items on your list.
Nevertheless, if you want to change a list while working on the items, you
need  a  while  loop  test.  With  this,  you  can  collect,  store,  and  arrange
different inputs to report or examine later.
How to Move Items from a List to Another
Let us consider a list comprising of students registered but not approved to
Download 2,02 Mb.

Do'stlaringiz bilan baham:
1   ...   102   103   104   105   106   107   108   109   ...   126




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish