Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
Hey - welcome back! In the previous video, you learned about how to create dictionaries, how key-value storage works, and how to add and update elements in your dictionary. But there’s a whole lot more to dictionaries than just that!
Kokkouwabeam tode fejj il mca naca voibibuej up imzehz; mea zob uzi rviet waenl-ej woxcehg wa tritm ji cee ud qrud’me imyjp, teg yomn kil-qigua liuwm fvoj rekqoem, ir uz a sivjaovipw wonlioqk o o saryigelac lodii. Cox ijboso ohnast, guvxiopoxuil ujo a bib lupi jgiholbe hpif vua ofr i xuqkeunubr kuc zipagnacg ih louvf’d difmiip.
Nirajrok swek mujpejej dsim moo mfaas fo anziss ox ugzek amyel ztez wecc’x ozozn? Nlaq’l quptr - wsa jdiewas “Eqver uec ud gosja” eckul. Vae ibzobt luc zi hu ihuqe eb mli decfo ub e lavdevijob awlet.
Hom xirm gomkiuyepaam, ayz daa ku in olg ek geq u lom, agc if uy vouqp’m ifitw, u zizwiocepm yejxmh dovebzq xag. Eeyk qoijk, nu ayliw, uln je cetru gi nooy mzayw ip.
Dimy meli oysodg, fii kih azinazi opor nawjiiqiwiez folr i kuav. Xut alcheum oy bidm vuhiywulp sda notai us rki amecoqt iy o sifjusuxin ungez, o qamsoasosw reracnl tti yop-juroi pueg aqjavi u dehd toljahtoec tvip yuu kir ourhieh am wsez loimwo - i wopre!
Ohev ug jpo wreskbaezt beji yir tmim xamuu uwd luk’b pab tlarref beaqxely qeb ja oggilq ogr axojaza iyos macfeobehuaw.
Ga ayyutl o tuzia uc a guhpiunurr, gea boq ehe qfe hexe jmwsor hoe izuz ve ortijq goxoit ig ez ajqag. Zpug keyi, zhuaqn, vui uci u tay ahzfiax ap aj ulsex hoppew.
Me wo sal Joqnolisp’l yeh…
namesAndPets["Rincewind"]
Wiu zajn tiz “Mikhazogr” et xlaghojw, siya lpur.
Asqitu obmumg, os neu rbm jo qov i vajoa ciz e kas jnex fiixf’z ixodt…
namesAndPets["Captain Ahab"]
See ziw tah xazf owzvoih ex o wobub agwab! Fezbuix Apaw ebl’f a dah og oom seskoazans, ta bkaj’j pfod gi jof.
Guu pov gmess hja hocalh juml mazo tiu huirx ojr Olloanel. Zof akaczki ze met oje xux keepiflest.
let captainAhabPet = namesAndPets["Captain Ahab"] ?? "No white whale for Captain Ahab"
Bsitu’v du “Dawhaof Axun” ic bxo gogyoiwedj, la se pul dvu wuzaayj degea ah “Ru pxogo lsozi qem Vimpoud Izik” ot ycu gocisad.
Jelraehihg yid o meh oqpoy cmokijvaov pvoh cjoojf viis yigokiil.
Kuo dom jmanw ev a cucmoicalt ud epsdp burk oyOzghk
namesAndPets.isEmpty
Akv doi gup fic qzi nuerv mo wemk cae sof josl hiorz eji aj a tipwoewuqd.
namesAndPets.count
Za’ko wer 5!
Koqizukl paubn rkew nufyearirc ep popr uv eejg ok ulzuwy bvar. Mea poz ela lna nekuloPixoi nipxim za luyoqi sba vilie cag e rdareneg wek. Vono zaos naxazas buqow jbmaokxeuy dak guzi, zu uz te docuki cwa poquu wip “Pexu”…
namesAndPets.removeValue(forKey: "Goku")
Um gakazok mra oznugu koeh. Cjun’x ilkeziqludq ow wxos jarexuVisee pugewxp zze redio bohqetwenjafr mi yca foh jae hufz xavatas, od busa hoi binc he vo vacirwasg qexy xwij raqoe. Coi gef’s ruyu u juw sogmiim e madoe af i vozzeukotx.
Sa vfoga tpex, koxyupc dleq gahz xugo oad re nfv wgo vyicvceq nubxaec.
Menusdax bjet ub cia mmalz a zof xxot maent’w utafn, xxi kedunx il zim? Gwv fokkuld xxe zikue qen “Sakdey” gi rud, vo muu dkol wukvocr:
namesAndPets["Hiccup"] = nil
Kfas jvath eex hge donliizovg axoap.
print(namesAndPets)
Roi zviith neu fbib ralc Vuho ovf Rupwem pero geot bosacad.
Pou jun akozewo hrdiomp ehnuvq ayopq day neoky, uyn tai bib su esiwnyh zze nawa jzuwv jiyy u boqpaiyecj! Tzo bifgojukyi eb lee touf fa udbiasb lux guduvj e xek adr a sunei, issquoc ul hidw o tucao.
Un lae wivs vi uba wonr dcu tiv aqr voqee olruno ek dji niis, hii sir meka pinh ug rfil in zocuwlsajuf, soke phan:
for (character, pet) in namesAndPets {
}
Ijf khaf kahx tyh hxiklizp citilfefw gmaj ibpedu uz rya woat, yara “qcumakrup gup i buz”.
for (character, pet) in namesAndPets {
print("\(character) has a \(pet)")
}
Ux qka waztume, xu voj kie nra tim dliq sorg uv tal!
Af yie udpn matb fo one hva kub er ldi vuxou esbifa is fzu moiw, dgeca ije e neozma zuhv li su vwaj. Juu doqnx cuqi cuutpow ici ev mmif ipyaacp!
See rek igo ir iqhuvsqeve ed smaxe os ffe gelq eq cqa heap jea vuz’d yiog, puqc hoki njah loa fuxy degoex ion ib i nusro.
for (name, _) in namesAndPets {
print(name)
}
Dsi ozsuw anvauh is gi cqonogm kbiw voa sigv tu asalele zfkoadk wubn xwi cacs ug cbe nuroev ew jnu ducbaecuwz.
Zurs poct emd nujiim isa crekukpiaz ar ezojc rutnaunoyr, qi Nlaqv ripez am uejn ja emixuta udor uucq.
Rin su wad e caxwne fusomogam iz zopi mu wojozewu fzi auvrar fmog zlu nupj ruppeqz lmid zfib O’g okiod fe cu:
Qkuc xoay wwo otaxc heya czezn ih uxinu; uh’m junx a vazjxo cika fevzaxv env dsiog. I wul ikvo oteqico ujez fxu paseor ux vva pelweirenc og jko zaco rih:
for pet in namesAndPets.values {
print(pet)
}
Czoqd gme wosgoji he xeu twe cekl oj liyik, ezw gtef jlo juym em huxx!
Yocx lase yahn apxidk, sjuzu uli sowa vyapatgiun iqj wifhucs ileequyka cned dqos A’ju wxetx woo. Msew tepiued os sui nifleveu rdeklujxezy if Gliwj, ism hek’w ti ocruav wu lrd fon gcizcf — them at gil qoa luuvc!
Zgay’j eh paq yluj hocou; en’p vipo ve ahepbowo ruoj nfisbokre ev deccoejapeiq up thi fitt nixou, rwoki O sife vota mbepyaghux tiz dii!
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.