0

dictionary

def, I don't get this part

26th Oct 2025, 1:39 PM
Tun Tun
Tun Tun - avatar
6 Respostas
+ 4
dictionaries are in key and values pairs and it do not have any indexes. It can be integer, strings, float anything { 'key':value, 'key':value } Ex: { 'ball':46, 'cricket':34, }
26th Oct 2025, 2:13 PM
Unknowns
+ 3
Unknowns , your statement that any data type can be used in dictionaries can mislead readers. a *key* must be hashable, that means: > a keys must be an *immutable data type*. we cannot use data types as a key that can change after they are created like: > list, dictionary, set *values* can be of any data type
26th Oct 2025, 5:02 PM
Lothar
Lothar - avatar
+ 1
In What language? Python, C#, ...
26th Oct 2025, 1:41 PM
Roman Koerdt
Roman Koerdt - avatar
+ 1
Lothar I never mentioned keys to be of any data type and thanks for clarifying in detail
26th Oct 2025, 5:14 PM
Unknowns
0
def is a pre defined keyword in Python used for creating a function that can be used whenever required. Ex:- def add(): a=4 b=5 print(a+b) add()
27th Oct 2025, 6:35 AM
Kartik
Kartik - avatar
0
I'd like to invite you to join our vibrant community of programmers on WhatsApp! Our group is dedicated to helping each other with coding challenges, sharing knowledge, and learning from industry experts. Whether you're a beginner or an experienced developer, you'll find valuable resources, support, and camaraderie here. Join us to: - Get help with coding problems and challenges - Share your expertise and learn from others - Stay updated on the latest programming trends and technologies - Connect with like-minded developers and build meaningful relationships Click this link to join our community https://chat.whatsapp.com/FW0nBbr3Eug3oTiL1U53gR Looking forward to coding, learning, and growing with you!"
28th Oct 2025, 6:13 AM
Precious
Precious - avatar