Комментарии:
You guys watch each other tutorials before creating one? You folks all show the same methods!! Watch one and you watched all, right?? Waist of my time.
Ответитьthank u man
ОтветитьHelpful and Informative
ОтветитьI'm never naming my dictionary as "myDict"
🙂
for those new to this topic like me
in the example 'USA': 'Washington DC' - USA is the key and Washington DC is the value
May seem obvious but realising this made me understand this easier and hopefully you too
you explore parts of topics that a lot of others do not.
much appreciations for that
It was really helpful, thank you.
ОтветитьI have a table and I want to assign my keys as a Table Headers. Table has 50 columns (keys) and 100 rows.
ОтветитьSo when I use popitem() it returns me the key and value of that dictionary( which was under curly braces { } ) as a tuple ( (... ...) ). May I please know what is the reason behind it or it is by definition/ trivial
Thanks for the great video content!
mydik = {'size': ['small', 'medium', 'large'], 'color':['brown', 'red', 'black'], 'weather':['warm','cold']}
print(mydik['size'][0])
print(mydik['color'][0])
print(mydik['weather'][1])
Awesome Awesome Awesome
Ответитьmydict :p
Ответить2.
s=input()
s=s.split()
h=[]
for i in s:
h.append (i[::-1])
k=" ".join(h)
print("obrnuto", k)
a=[]
for j in h:
a.append(j.count("a"))
r=[]
for y in range (len(s)):
l=a.index(max(a))
r.append(s.pop(l))
a.pop(l)
print(r) rijeci po broju slova a
1.
s=input()
brojrijeci=s.count(" ")+1
print(brojrijeci)
s=s.replace("a","")
print(s)
r={}
s=s.split()
for i in s:
r.update ({ i:len (i) })
print(r)
Can you add a key to a dictionary with multiple values AND multiple value types? i.e. "Variable1": "MyName", 14, [A, B, C]
Awesome tutorial!
Excellent video
Now I think I can deal with Dict:
my_dict = {"content": something, "length": None}
instance = my_dict.pop("content")
my_dict["length"] = scan(instance, in="cm")
if my_dict["length"] > 12:
yup()
else:
nope()
Kudos to you, the way you applied this tutorial helped me understand how the other concept works as well.
THANK YOU!
how to add a element at particular index?
ОтветитьFrom 3.7+ dictionaries are now "insertion ordered"
ОтветитьThanks so much for the useful video.
ОтветитьI was listening to this one my speakers at max volume and just kept hearing mydi**
ОтветитьThank you
Ответитьwhich IDE do you use?
ОтветитьYou go so far the tutorial is worthless.
Ответитьman love this videos , god bless you
ОтветитьExcellent!
ОтветитьЭто лучшее видео на свете
ОтветитьSir very nice video. I have one question , how to print specific key value in a dictionary. Without entering its name in code. We should get the output as - Enter the product name ( some key)
- it's value should come as output. Please help me sir.
Dictionaries: test your comprehension:
- how to initialize a dictionary? (2 ways)
- how to delete by key? (2 ways)
- how to delete the last inserted key? (only as of python 3.7)
- how to iterate keys, values and elements?
- how to copy a dictionary? (2 ways)
- can a tuple be a dictionary key? why?
Change the name for this video series. This is beginner stuff. Don't
lie to people by calling it advanced. You lose your credibility from
the start when you LIE to people right from the start.
Sir I Ask One Questions Please....??
In this 21 lecture...a to z python is completed....Basic to advance everthing ??? Say me sir please
Quit Interesting
ОтветитьThe t is sometimes missing in mydict...
Ответитьyou wrap up on everything, you are a legend
ОтветитьThis is a great series to speed through for my upcoming interview!
Ответитьa little trick: reverse dictionary's key and value
mydict = dict(a=0, b=1, c=2)
print(mydict)
reversed_mydict = {v:k for k, v in mydict.items()}
print(reversed_mydict)
{'a': 0, 'b': 1, 'c': 2}
{0: 'a', 1: 'b', 2: 'c'}
Use with caution. When you have same value in the dictionary, the reversed dictionary's value may be overwritten.
mydict = dict(a=0, b=1, c=1) # both b and c have the same value 1
print(mydict)
reversed_mydict = {v:k for k, v in mydict.items()}
print(reversed_mydict)
{'a': 0, 'b': 1, 'c': 1}
{0: 'a', 1: 'c'}
hahaah..thank you
ОтветитьWhat is mutable?
ОтветитьHi, I just started coding and I was wondering what platform you're using for your code. I've been coding through IDLE but it's a lot less easier to create big functions and see the outputs clearly, so I was just wondering
ОтветитьHello, I'm recently starting using VS Code for my python projects, how are you able to run the code on the output section without running the whole file address, I'm having trouble on that. Thank you.
ОтветитьIm just starting to learn Python. I just wanted you to know how insightful and helpful your videos are. I have a question - I have a large file of data organized in alphabetical order. what is an efficient way to parse out ONLY USA data. the file is a .txt file. any comments would be appreciated, I will continue with your site thank you
ОтветитьThanks for this wonderful video, you explained a very simple way. I have one query related to a python dictionary is it possible we can store excel data into a python dictionary and perform some CRUD operation on it.
Ответить