I not understand with .get dictionary | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

I not understand with .get dictionary

please help me to understand

2nd May 2017, 7:12 AM
Yusuf Andi Saputro
Yusuf Andi Saputro - avatar
1 Resposta
+ 2
The get method is pretty much the same as the call mydict[key], but you can provide a default argument in case key is not in the dictionary. Example code: https://code.sololearn.com/cpqf2uwY5XzV
2nd May 2017, 8:50 AM
Tob
Tob - avatar