I can’t understand dictionaries and sets… /u/Envixrt Python Education

..is there any video/article/page/anything else you could recommend that would teach me dictionaries and sets? I don’t think I can point at one specific thing that I don’t understand, I thought it was all easy but then came the time to write a program and nothing worked. I am mostly struggling with programs where I have to take the input from a user like “Make a python program for 3 people to enter their name and favorite coding languages into a dict”.

Here is the error msg –

 File "文件Pythonlearning.py", line 5, in <module> a.update[{name} : {lang}] ~~~~~~~~^^^^^^^^^^^^^^^^^ TypeError: 'builtin_function_or_method' object is not subscriptable C:UsersHPOneDrive 

and my code –

a = {} name = input("Enter name: ") lang = input("Enter language: ") a.update[{name} : {lang}] name = input("Enter name: ") lang = input("Enter language: ") a.update[{name} : {lang}] name = input("Enter name: ") lang = input("Enter language: ") a.update[{name} : {lang}] print(a.items()) 

oh, if you’ll suggest a video, it can be in English or in Hindi, I don’t mind either way. Thanks!

submitted by /u/Envixrt
[link] [comments]

​r/learnpython ..is there any video/article/page/anything else you could recommend that would teach me dictionaries and sets? I don’t think I can point at one specific thing that I don’t understand, I thought it was all easy but then came the time to write a program and nothing worked. I am mostly struggling with programs where I have to take the input from a user like “Make a python program for 3 people to enter their name and favorite coding languages into a dict”. Here is the error msg – File “文件Pythonlearning.py”, line 5, in <module> a.update[{name} : {lang}] ~~~~~~~~^^^^^^^^^^^^^^^^^ TypeError: ‘builtin_function_or_method’ object is not subscriptable C:UsersHPOneDrive and my code – a = {} name = input(“Enter name: “) lang = input(“Enter language: “) a.update[{name} : {lang}] name = input(“Enter name: “) lang = input(“Enter language: “) a.update[{name} : {lang}] name = input(“Enter name: “) lang = input(“Enter language: “) a.update[{name} : {lang}] print(a.items()) oh, if you’ll suggest a video, it can be in English or in Hindi, I don’t mind either way. Thanks! submitted by /u/Envixrt [link] [comments] 

..is there any video/article/page/anything else you could recommend that would teach me dictionaries and sets? I don’t think I can point at one specific thing that I don’t understand, I thought it was all easy but then came the time to write a program and nothing worked. I am mostly struggling with programs where I have to take the input from a user like “Make a python program for 3 people to enter their name and favorite coding languages into a dict”.

Here is the error msg –

 File "文件Pythonlearning.py", line 5, in <module> a.update[{name} : {lang}] ~~~~~~~~^^^^^^^^^^^^^^^^^ TypeError: 'builtin_function_or_method' object is not subscriptable C:UsersHPOneDrive 

and my code –

a = {} name = input("Enter name: ") lang = input("Enter language: ") a.update[{name} : {lang}] name = input("Enter name: ") lang = input("Enter language: ") a.update[{name} : {lang}] name = input("Enter name: ") lang = input("Enter language: ") a.update[{name} : {lang}] print(a.items()) 

oh, if you’ll suggest a video, it can be in English or in Hindi, I don’t mind either way. Thanks!

submitted by /u/Envixrt
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *