Python Tutorial for Beginners 5: Dictionaries - Working with Key-Value Pairs

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 852

  • @1cannon3
    @1cannon3 5 лет назад +840

    0:07 - Terminology
    0:14 - Key/Value pairs definition
    0:37 - First example (Student using a dictionary)
    0:45 - { }, Dict notation, curly braces,
    0:50 - adding elements
    1:32 - [ ] Square bracket access of the dict
    2:04 - Dict items can be many things, they’re not bound to one “type”
    2:14 - Keys can be any immutable data type
    2:24 - Example of an Integer being the key
    2:44 - Accessing a key that does not exist
    3:00 - Alternative to “throwing an error” if a key does not exist
    3:05 - Sometimes you will want to return None or a default value if key does not exist
    3:09 - .get( ) access of the dict
    3:30 - accessing a key that does not exist with the .get method as opposed to [ ] square bracket access
    3:40 - Specifying a default value for keys that do not exist
    4:01 - Adding a new entry to dictionary
    4:30 - Changing/updating values via key access
    5:02 - Changing/updating values via .update() method
    5:21 - .update() takes in a dict as an argument
    5:57 - Deleting a specific key and its value
    6:01 - Option 1 for deleting a key and value: del keyword
    6:26 - Option 2 for removing a key and value: .pop() method
    6:30 - Remember the .pop() method not only removes the item put pops it off or returns it to you
    6:35 - Therefore you can recover the popped item with a variable assignment
    7:07 - How to loop through all the keys and values
    7:13 - Finding out the number of keys in dict with len() function
    7:30 - Print all keys with .keys() method
    7:39 - Print all values with .values() method
    7:47 - Print both keys and values with .items() method
    8:07 - Looping is slightly different then lists because dicts are concerned with pairs (Key : Value)
    8:33 - How to loop through keys AND values

    • @dreamscapeai7
      @dreamscapeai7 5 лет назад +8

      Nice, this helps, thanks

    • @yesdone4993
      @yesdone4993 5 лет назад +4

      thank u

    • @MrXIndependent
      @MrXIndependent 5 лет назад +11

      God among men.

    • @andyn6053
      @andyn6053 5 лет назад

      How do you write a list with all the content with links like this?

    • @MrXIndependent
      @MrXIndependent 5 лет назад +5

      @@andyn6053 diligent note taking. and you make the links by typing the time like 1:02

  • @k8ysk8
    @k8ysk8 4 года назад +255

    You are absolutely a lifesaver! My compsci prof is really smart, but absolutely terrible at explaining things efficiently. I understand more about dictionaries now after your 10-minute video than I previously did after my 3-hour lecture. Thank you so much, I will definitely be subscribing and donating to your patreon in the future! (once covid is over and I have a job again ):)

    • @majormac7814
      @majormac7814 2 года назад +12

      most compsci profs ive noticed r too smart to teach newcomers

    • @master-oh6zn
      @master-oh6zn 2 года назад +8

      did you donate him

    • @m.night_shyamamalama_sama_kun
      @m.night_shyamamalama_sama_kun 2 года назад +7

      Fulfill thy promise and donate, my child.. or face the wrath of our comments

    • @soundrex9995
      @soundrex9995 2 года назад +2

      Yea seems like a lot of teachers r like that
      I’ve noticed a lot of these ppl who know compsci say they were self taught so it’s not like a regular class that would have traditional methods of teaching

    • @umxltiii9796
      @umxltiii9796 Год назад +1

      @@majormac7814 I would call it arrogance lol

  • @satyampriyadarshi6314
    @satyampriyadarshi6314 4 года назад +98

    I'm applying for Masters in Data Science and I just want to say that by following your videos, I will be able to develop a strong base and maybe would be able to fulfil my dreams in a long run all the contribution goes to you Mr Corey Schafer I'm thankful to God that I found your channel.

    • @anindiansquirrel
      @anindiansquirrel 8 месяцев назад

      Hello can you help me out? I am also pursuing MS in Data Science. Give me some valuable advice.

    • @r3ylow
      @r3ylow 8 месяцев назад +3

      @@anindiansquirrel bro prolly died its been 4 years

    • @anindiansquirrel
      @anindiansquirrel 8 месяцев назад

      @@r3ylow lol haha your funny man

    • @r3ylow
      @r3ylow 8 месяцев назад

      @@anindiansquirrel oNLY IF IWERE A MAN 💔💔💔💔 LMAO

    • @anindiansquirrel
      @anindiansquirrel 8 месяцев назад +2

      @@r3ylow uh oh. sorry babes :)

  • @Vintagetube310
    @Vintagetube310 2 года назад +4

    You literally explained lists and dictionaries in the simplest terms possible. Thank you so much, I don’t know why professors cannot be like this. You literally gave me more of a clear understanding with the logic and the syntax behind creating dictionary lists with keys and values, as opposed to how my professor does it. Thanks so much. I subscribed. Looking forward to more tutorials.

  • @MyTube4Utoo
    @MyTube4Utoo 7 лет назад +160

    Best Python tutorials on the planet!

    • @vinaynair1911
      @vinaynair1911 7 лет назад +1

      true

    • @KalvinPatel
      @KalvinPatel 6 лет назад +1

      how well do you know python now? I'm about to watch the next video after this dictionary one. Gonna continue on but just wondering has it benefited you yet?

    • @savitaprabhakar3010
      @savitaprabhakar3010 5 лет назад

      @@vinaynair1911 yeaaaaaa'

  • @sfs25c
    @sfs25c 7 лет назад +59

    I was struggling to learn Python.Even I took a course to learn Python.But I will Thumbs UP to you for explaining all the topic in such a easy.Your videos are the best.With each video, I am gaining confidence.

    • @coreyms
      @coreyms  7 лет назад +9

      Thanks! Glad you're learning and finding these helpful!

  • @xxPingPangPow
    @xxPingPangPow 4 года назад +11

    I already took a graduate course for intro level Python-- and your videos are honestly better! chugging through the beginner videos as a refresher and I cannot wait to jump into the more advanced topics. I feel so lucky for finding such a great resource-- and it was easy, your videos are so widely reccomended! Thank you for developing such an great and accessible course.

  • @alecwilliams945
    @alecwilliams945 6 лет назад +25

    These tutorials are some of the best that I have seen out and cover a wide assortment of topics from Beginner to Advanced. Great Work Man!

  • @raymondtan9112
    @raymondtan9112 5 лет назад +18

    Corey has the best Python tutorial in my 3 years of trying about everything

  • @goncalosd
    @goncalosd 5 лет назад +6

    What a Legend! Someone going out of his way just to make knowledge available to others... that is Special. Congratulations Corey, these videos are awesome !

  • @mahshidpooladvand8502
    @mahshidpooladvand8502 11 месяцев назад +2

    Mr. Schafer, I've never felt so close to learning these concepts after spending so many Python courses... I will be donating for sure.

  • @mudhitkumar
    @mudhitkumar 5 лет назад +5

    Finally, I a feeling confident about programming, I have been trying from so many months just to learn the concepts I have given so many attempts before this as well. Just to memorize the concepts all the time. However, back in the time I found that stuff really difficult to remember. Now with these videos, I can learn how to code and it is really easy to memorize the concepts as well, the way you explain things, it is really awesome, I really appreciate your work.
    Thank you,
    Mudhit Kumar

  • @yadneshkhode3091
    @yadneshkhode3091 6 лет назад +25

    BEST TUTORIAL EVER!!!!!!!!!!!!! glad I found it recommending it to all my friends in college

  • @AmDsus2Fmaj7Am
    @AmDsus2Fmaj7Am 7 лет назад +98

    Just wanted to say you are awesome. Thanks for the videos.

  • @valeriatapia1128
    @valeriatapia1128 2 года назад +4

    Finally someone who explains this stuff in a much simpler and less confusing way. Thank you so much!

  • @brijeshsamal7035
    @brijeshsamal7035 3 года назад +6

    I love Corey's videos, they're super simple and straight to the point, and explain everything very well.

  • @shivrajsingh5559
    @shivrajsingh5559 4 года назад +2

    These are the best article i have found. I completed python from other sources and someone referred me your pandas tutorial they are just awesome. After watching your pandas tutorial wants to again go through all these python tutorial.

  • @etc3redsox
    @etc3redsox Год назад +14

    Hey Corey, I know these videos are geared towards beginners like myself - and also a few years old at this point - but it would be helpful to explain how each concept in the tutorials are used in the real world, beyond just printing out values.
    Hopefully this makes sense! Thank you for the instruction - I appreciate your teaching style

    • @Nikhils_Gaming
      @Nikhils_Gaming Год назад

      He kinda does that... The code he used *could* be used in a program that calculates a student's grades or keeps track of them like google classroom. However, it was simplified for the video. Hope this helps

  • @Ninja-iq2xt
    @Ninja-iq2xt 7 лет назад +17

    Glad to see you with totally refreshed Python Tutorials, Thank you so much Corey!

  • @swaantjuh
    @swaantjuh 5 лет назад +8

    This is the second time I looked up something about Python on youtube. This was so well explained that I wanted to sub, but apparantly you were also the guy who explained regexes like perfectly, therefore I already subbed.. Thanks for keeping programming fun!

  • @kimpierce7825
    @kimpierce7825 3 года назад +1

    You are saving all of my bacon. I didn't know anything about dictionaries before entering into grad school that assumed I was very familiar with them. This is everything. Thank you~~~

  • @michaelyaacoub2520
    @michaelyaacoub2520 Год назад +2

    It so funny I put "find me a video that explains sets and dictionaries in py better than my professor " into ChatGPT and it recommended me this Corey's content. So cool.

  • @sheikhspeare7262
    @sheikhspeare7262 4 года назад +1

    Just from the start of the video I knew you sounded professional. I paused and cake to the comment section and saw a lot of these people learnt. I have just started to actually learn this all. Don’t know any of the languages. If I find this helpful I could probably donate.

  • @pax61
    @pax61 6 лет назад +6

    The best, most clear and concise description I've found. Good job!

  • @AnkitSharma-um4ml
    @AnkitSharma-um4ml 2 года назад +8

    The 9 minutes of this tutorial is far better than the 1 hour tutorial I learned from Udemy . Thanks, Corey

  • @glydon-w2w522
    @glydon-w2w522 6 лет назад +5

    I have made a notebook to write down the notes and key points . I dont have to suffer in my college learning basics . I can move forward to advance topics
    So grateful to you and your indepth
    Explanation

  • @anshikapal6992
    @anshikapal6992 4 года назад +13

    Man u should be python teacher a great teacher who can explain everything so easily after watching u r video i m having no doubts i m in 11th commerce 😅

  • @Aditya-ss1rq
    @Aditya-ss1rq 6 лет назад +11

    I dnt how this video ended on my recommended list but its great. Your tutorials are far better than paid tutorials. Subcribed to your channel., 👍

  • @Levinsane
    @Levinsane 2 года назад +3

    These were the tricky ones. I'm a python learner and I was stuck in one of my practice problems. Thanks for this great video Corey!

  • @akmzahidulislam2764
    @akmzahidulislam2764 4 года назад +1

    Shot and quick; yet covering all the important aspects of the topic.
    Many thanks.

  • @swatisrivastav5620
    @swatisrivastav5620 3 года назад +6

    You are amazing, went through other platform courses, even paid ones, but your's is simply amazing. Thank you for existing 🙏. The way you explain every detail that too without letting us feel pressurized is so rare.🥺 Thanks a lot sir 🙏🙏

    • @vasudev16180
      @vasudev16180 3 года назад

      Yes, He is. Thank You for praising my Guru! #KeepLearning

  • @inc0nsistentgent893
    @inc0nsistentgent893 Год назад

    dude...this just explained so much to me in such little time. I have been scratching my head for a while over things and not really understanding some looping within these dictionaries, but your explanation makes so much more sense that its actually starting to come together. Thank you.

  • @effuseakay
    @effuseakay 5 лет назад +14

    WOW! that was clear, straight to the point, and perfectly explained!!! Thank you so much!

  • @islamalmsarrhad2152
    @islamalmsarrhad2152 Год назад

    I've been learning Python for a while, and you are gifted. Many thanks

  • @andyn6053
    @andyn6053 5 лет назад +1

    You have the best python tutorials on youtube without any doubt Corey!

  • @dhoomketu731
    @dhoomketu731 6 лет назад

    Corey, you are a brother from another mother. You make stuff really easy to understand.

  • @shreyaschavhan5522
    @shreyaschavhan5522 2 года назад +1

    + Methods : 3:00
    .get()
    .update()
    del dictname[]
    .pop()
    len()
    .keys()
    .values()
    .items()
    + Looping : 8:10
    for key, value in students.items()

  • @arthurivex2298
    @arthurivex2298 4 года назад

    I am taking a class at my local College, and your videos are a great supplement to the topics in the class!!! Thank you!

  • @marlowemichaelson1366
    @marlowemichaelson1366 4 года назад

    Between you and Mosh, I don't know of a better way to learn Python. Thank you so much.

  • @fantakettle100
    @fantakettle100 2 года назад

    I swear to god this is the only video on youtube that actually properly explains dictionaries without overcomplicating.

  • @potsatamas4859
    @potsatamas4859 7 лет назад +13

    This courses are really helpful! Saves a LOT of time and money! Thank you very much!

    • @msrikavya9651
      @msrikavya9651 6 лет назад

      Pótsa Tamás in fact these videos are for learning but if need a certificate that u have a completed a course on python by writing the exams then u can't rely on them:)

    • @yadneshkhode3091
      @yadneshkhode3091 6 лет назад +4

      no one cares for certificates knowledge is everything

  • @mrmuranga
    @mrmuranga 6 лет назад +2

    very simple and nicely put....am a python enthusiast and everyone I learn something from your videos

  • @novicetech1
    @novicetech1 7 лет назад +259

    Thanks again. I actually thought I knew python dictionaries. Now I feel like Jon Snow. I know nothing. I could have saved a bunch on Udemy if I had found you first.

    • @MegaJohn144
      @MegaJohn144 6 лет назад +6

      I could say exactly the same thing.

    • @andyn6053
      @andyn6053 5 лет назад +3

      @@MegaJohn144 Udemy is crap

    • @bpkoiralaproductions6004
      @bpkoiralaproductions6004 4 года назад +11

      @@andyn6053 Yes, Udemy sucks. It would be better and cheaper to just buy a book and read it!

    • @Ryan-fl2dz
      @Ryan-fl2dz 4 года назад +3

      i'm glad i didnt use udemy so fast...

    • @JY0002
      @JY0002 2 года назад

      JON SNOW LOL

  • @sazopro
    @sazopro 4 года назад +3

    I'm studying Python on DataQuest and this channel is amazing to compliment the theory. Mos def will be donating soon!

  • @nachiketwattamwar9706
    @nachiketwattamwar9706 5 лет назад +8

    Best python tutorials I ever found....

  • @kmwong3808
    @kmwong3808 3 года назад

    Wow! I didn't fall asleep while watching the video. It is precise and easy to understand.

  • @tj9382
    @tj9382 Год назад +1

    Teaching like this is gold.

    • @easydatascience2508
      @easydatascience2508 Год назад

      You can see my playlist too. The channal has Python and R playlist for fundamental tutorials. Source files available too.

  • @muhammadbinzafar2216
    @muhammadbinzafar2216 6 лет назад +1

    Yes, the tutorials here are vastly better - really better.

  • @davidbolduc4378
    @davidbolduc4378 2 года назад

    This video was the best 10 mins I have had in a while.

  • @oiahsdokad2459
    @oiahsdokad2459 4 года назад +5

    Thank you so much for these videos.
    I have tried learning Python through EDX and Brilliant.
    EDX was good but in two of your videos, I learned more than in several hours of EDX.
    Brilliant has a wide variety of courses, so judging it on one alone isn't perhaps fair. However, for the time I put in, the knowledge I received was minimal
    Here, in just a few hours of learning, I feel really comfortable in writing basic code and am looking forward to all your future videos.
    I've lost my income so can't commit to a monthly payment but will send a one-off for now
    Thanks so much

  • @SmokyBigSmoke
    @SmokyBigSmoke 4 года назад +2

    This is exactly what i was looking for. The best explanation ever.

  • @expat2010
    @expat2010 4 года назад

    Consistently the best and most efficient videos on every subject you cover!

  • @hdv-q4n
    @hdv-q4n 4 года назад +1

    You deserve 10 million subs, You are simply amazing!!

  • @IsSheRG710
    @IsSheRG710 5 лет назад +1

    I've struggled to understand syntax but you've been very clear and explained the 'why' of what to type and functions to call perfectly. Thank you so much! I feel like i'm truly learning and getting it!

    • @coreyms
      @coreyms  5 лет назад +1

      Glad to hear that!

  • @us-xf3kk
    @us-xf3kk 5 лет назад +3

    Best tutorial on RUclips and in the world

  • @androidynamit
    @androidynamit 4 года назад +1

    This is hands down the most detailed tutorial series I ever had, Thank You, Corey!!

  • @meltedcheese1908
    @meltedcheese1908 6 лет назад +2

    I am glad that I found your channel. It is really going to be helpful, thanks mate!

  • @abdurahmanomoruyi7753
    @abdurahmanomoruyi7753 7 лет назад +1

    I love you corey. you really make my experience with python so much better

  • @r.hyacinthe7756
    @r.hyacinthe7756 4 года назад +1

    This is the best Channel on Python.

  • @spencerobrien3213
    @spencerobrien3213 6 лет назад +3

    Great Video to help me get a grasp on how dictionaries work! keep up the great work, you are a great instructor!!!

  • @rogal_dorn5600
    @rogal_dorn5600 11 месяцев назад +1

    Short and straight to the point. Nice vid m8

  • @LivingInnocently
    @LivingInnocently Год назад

    Effortless and excellent teaching by a born teacher.

  • @jasondeb2678
    @jasondeb2678 4 года назад

    I've RUclips adblocker but I disable it when watch your channel and I don't skip the add so that you can earn the minimum for providing such an wonderful platform for us to learn

  • @raison991
    @raison991 2 года назад

    Of all the Python videos tutorials you are the best. Very practical and clean concept and usage and fun in learning.

  • @emmanuelmasemola1014
    @emmanuelmasemola1014 2 года назад

    These are the kind of channels that I subscribe to, very insightful

  • @ErikSkoglund-je7ph
    @ErikSkoglund-je7ph Год назад

    Currently doing the Python crash course by Coursera and this is just sooooo much better. Amazingly happy I found these videos. Extremely well explained.

    • @benjaminjohnpabroquez8012
      @benjaminjohnpabroquez8012 Год назад

      You can copy my code and test it for more practice hehe :) that's for free hehe
      foods = {
      "pizza": 20,
      "burger": 40,
      "hotdog": 30,
      "pasta": 25,
      "salad": 15,
      "steak": 50
      }
      order = []
      total = 0
      print("Menu:")
      for food, price in foods.items():
      print(f"{food}: ${price:.2f}")
      while True:
      food = input("Enter the food you'd like to order or q to quit: ").lower()
      if food == "q":
      break
      elif food not in foods:
      print("Invalid food item!")
      else:
      order.append((food, foods[food]))
      total += foods[food]
      print(f"{food} added to order. Total cost so far: ${total:.2f}")
      print("Order summary:")
      for item in order:
      print(f"{item[0]}: ${item[1]:.2f}")
      print(f"Total cost is: ${total:.2f}")

  • @sujaa1000
    @sujaa1000 3 года назад +1

    Thanks a bunch to you Corey, I tried to learn Python from a number of resources, but I am able to understand and continue only your explanation. Your selfless service means a lot to a whole lot of people.
    I am learning Python to do some competitive programming, if possible can you make some videos which would need some logical thinking and apply algorithms in Python, which could set the path to take up competitive programming.

  • @patrickimoh
    @patrickimoh 4 года назад

    Having studied the Python Institute PCAP course, I'm finding this very helpful and I am experiencing some topics that weren't touched, which are useful for data analysis. Stuffs like union, intersection and difference... I'll definitely be watching till the end and will watch all videos again... Thanks for this...

  • @sanjayursal5330
    @sanjayursal5330 4 года назад +1

    You have the gift of making it easy and interesting to learn. Thanks

  • @Daverhan02
    @Daverhan02 6 лет назад +6

    These videos are very well designed! Thank you for your efforts of creating informative python videos!

  • @gdorman619
    @gdorman619 6 лет назад +1

    You're a really good teacher. You make things so easy. Thank you for your videos.

  • @tathagatsharma5773
    @tathagatsharma5773 5 лет назад +1

    best explanations eveeeeerrrr.... Thanks a lot man your tutorials are way better than anyone else's

  • @artur2.043
    @artur2.043 2 года назад

    Quick concise information. CLEAN. Thank you sir! Best I have found on youtube so far.

  • @254-ranquilTunesHub
    @254-ranquilTunesHub Год назад

    This is one of the best ever to encounter video explanation. The content is clearly explained and much easy to understand. Thanks bro...

  • @aronquemarr7434
    @aronquemarr7434 6 лет назад +1

    This is so much better than Programming Knowledge.

  • @marvinkaranja9847
    @marvinkaranja9847 5 месяцев назад

    Your videos are just wow. Simple and easy to follow. Thank You for this amazing work

  • @andyn6053
    @andyn6053 5 лет назад +2

    Really great videos! You are way better than my university teacher in explaining things!

  • @maheshvenkat9956
    @maheshvenkat9956 4 года назад +2

    This was a comprehensive and well explained video

  • @palindrome8845
    @palindrome8845 5 лет назад +1

    Very good tutorial. Thanks to you, I now understand dictionaries better.

  • @ahmednazih5686
    @ahmednazih5686 6 лет назад +4

    Okay You Sir are a legend! Thank you very much for these Tutorials. hands down best Python Tutorials on Internet

  • @suryanshpandey832
    @suryanshpandey832 6 лет назад +1

    thank you sir, your videos are of great help for people who can't afford expensive courses on various sites.
    so please keep making such good videos
    best of luck from INDIA

  • @TonyChen910
    @TonyChen910 7 лет назад +2

    The tutorial you provided is pretty awesome, which is greater than most of the MOOC course, I am looking forward to the python re module tutorial. BTW, your English accent is awesome toooooo, which makes a lot of things that easy understood for the people that come from other language. Thanks

  • @sareng2005
    @sareng2005 5 лет назад +1

    wow, thank you. This video was very straight forward and easier than reading a book.

  • @wenyiwang7306
    @wenyiwang7306 6 лет назад +1

    I found this is sooooooo easy to understand.!!!The best tutorial for a beginner!

  • @avantisinha3770
    @avantisinha3770 6 лет назад +1

    I just needed to say how awesome your tutorials are!!!
    Please keep it up and make new tutorials.

  • @soumyazyx
    @soumyazyx 5 лет назад +2

    Thank you Corey for your time and effort. Keep spreading the knowledge.

    • @us-xf3kk
      @us-xf3kk 4 года назад

      he will but you donate

  • @shrawansahu9500
    @shrawansahu9500 2 года назад

    You are like Python God for us, Thanks a ton @Corey Schafer 🙌

  • @TwstedTV
    @TwstedTV 5 лет назад +1

    I really gotta get the hang of Dictionaries, Lists and Tuples. Looks like I have to re-watch this video many times for my brain to finally figure it out.
    I love your video, very well explained..... :) I just have to memorize it, if my brain decides to wake the hell up some day.....LOL

  • @gauravgoyal6505
    @gauravgoyal6505 3 года назад

    i never saw this such great work on youtube related to programming
    thank man

  • @Pyazdan
    @Pyazdan 4 года назад

    Thank you for the brief and concise dictionary tutorial.
    Looking forward to seeing more tutorials from you.

  • @kaustubh.sharma
    @kaustubh.sharma 5 лет назад +96

    The day i'll get my first salary i'll surely contribute!
    for now only i can say is Thank you so much!

  • @franciscorivas4036
    @franciscorivas4036 5 лет назад +1

    Your videos are superb! Thank you from Ecuador.

  • @Nia-sk8qo
    @Nia-sk8qo 2 года назад

    I really do feel comfortable with dictionaries now! Thanks a lot.

  • @KhanSameerlolkhanme
    @KhanSameerlolkhanme 4 года назад +2

    When I will become a data analyst I will donate for your work
    Incredible work
    Great better than my college teachers

  • @terryallen3904
    @terryallen3904 2 года назад

    Key = word and Value = Definition. This made the penny drop, I get dictionaries now! Thank you.

  • @Faceglitch
    @Faceglitch 3 года назад

    The most solid python tutorial I have ever seen. Thank you!

  • @YURTZYN42
    @YURTZYN42 3 года назад

    life savior of a video. God bless you.

  • @edgostyn
    @edgostyn 6 лет назад +1

    Many thanks! A great hug from Brazil!

  • @Noobshreds
    @Noobshreds 4 года назад

    I was struggling with a practice project in automate the boring stuff where you basically have to make a fantasy inventory. I couldn't figure it out and everywhere I looked I ended up finding solutions like 'print(str(inventory[item]) + ' ' + item)' for this one particular line. Confusing as shit. All I had to do is watch this video and realize it's as easy as writing print(key, value). Maybe there are benefits to the former, but my point is that this channel has been VERY helpful in putting everything in lamens terms... THANK YOU!

  • @mustafayasin4469
    @mustafayasin4469 6 лет назад +3

    You are literally saving lifes!