Python sets 🍴

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025

ความคิดเห็น • 62

  • @BroCodez
    @BroCodez  4 ปีที่แล้ว +34

    # set = collection which is unordered, unindexed. No duplicate values
    utensils = {"fork","spoon","knife"}
    dishes = {"bowl","plate","cup","knife"}
    #utensils.add("napkin")
    #utensils.remove("fork")
    #utensils.clear()
    #dishes.update(utensils)
    #dinner_table = utensils.union(dishes)
    #print(dishes.difference(utensils))
    #print(utensils.intersection(dishes))
    for x in utensils:
    print(x)

  • @ahmetunaldi7601
    @ahmetunaldi7601 3 หลายเดือนก่อน +1

    Bro is the greatest coder ....

  • @omar-hj8gm
    @omar-hj8gm 2 ปีที่แล้ว +3

    Just form your video's am starting to love coding thx a lot

  • @bekeshjr6412
    @bekeshjr6412 2 ปีที่แล้ว

    Thanks to you, everything was clear. I learned set and moving to the next one!

  • @BrainPermaDeD
    @BrainPermaDeD 2 ปีที่แล้ว +1

    The sets in python seems similar to what we studied in math class. Anyways, thank you for the free classes. Hope you are doing well👍.

  • @Plotwist320
    @Plotwist320 3 หลายเดือนก่อน

    great content easy to understand.

  • @niklasalexanderBjerkeland
    @niklasalexanderBjerkeland ปีที่แล้ว

    Great tutorial as always! Nice and clear

  • @kemann3815
    @kemann3815 2 ปีที่แล้ว

    Majestic

  • @mrfox8640
    @mrfox8640 2 ปีที่แล้ว

    you are one of the best

  • @tysonstones9271
    @tysonstones9271 8 หลายเดือนก่อน

    beautiful explanation bro

  • @manuelvaal1257
    @manuelvaal1257 3 ปีที่แล้ว

    loving it

  • @MinnieCharm
    @MinnieCharm 10 หลายเดือนก่อน

    VERY HELPFUL

  • @T_ootie_x_P_atootie
    @T_ootie_x_P_atootie 2 ปีที่แล้ว

    thank you, great video and easy to follow!

  • @beingzero7541
    @beingzero7541 3 ปีที่แล้ว

    Wow!

  • @dawn_22
    @dawn_22 2 ปีที่แล้ว +1

    It was very helpful, thanks.

  • @kamalrawat5648
    @kamalrawat5648 5 หลายเดือนก่อน

    Very Help Full Thanks bro

  • @parham6676
    @parham6676 4 ปีที่แล้ว +1

    nice

  • @John-ex3xc
    @John-ex3xc 2 ปีที่แล้ว

    Good job!

  • @kubach2897
    @kubach2897 3 ปีที่แล้ว

    Awesome

  • @sumanshuborkar5788
    @sumanshuborkar5788 2 ปีที่แล้ว

    I am the thousandth guy to like , so I deserve the shoutout!!!

  • @FushigiMigi
    @FushigiMigi 2 ปีที่แล้ว

    Thanks

  • @dragomircristian8588
    @dragomircristian8588 3 ปีที่แล้ว

    ure amazing

  • @ahiamatagabriel5696
    @ahiamatagabriel5696 2 ปีที่แล้ว

    thank you

  • @akshitdadheech9870
    @akshitdadheech9870 8 หลายเดือนก่อน

    God bless you bro.

  • @usingThaForce
    @usingThaForce 3 ปีที่แล้ว

    Love it bro

  • @Icysh-k2e
    @Icysh-k2e 2 ปีที่แล้ว

    ❤❤❤

  • @airlanggak5391
    @airlanggak5391 3 ปีที่แล้ว

    GREAT VIDEO!

  • @jacobshaull6455
    @jacobshaull6455 2 ปีที่แล้ว +1

    Say you combine dishes and utensils into a list. How would you find the unique # of only dishes in that list?

  • @elandavidson4171
    @elandavidson4171 3 ปีที่แล้ว

    Thank you for this

  • @spartanranger
    @spartanranger 3 ปีที่แล้ว

    Thanks for the video my Bro.

  • @reef_lk
    @reef_lk 3 ปีที่แล้ว

    Nice video bro

  • @asteiaellinikitv4193
    @asteiaellinikitv4193 2 ปีที่แล้ว

  • @ahmetaydn4416
    @ahmetaydn4416 3 ปีที่แล้ว

    thx

  • @Paco_3010
    @Paco_3010 ปีที่แล้ว

    thanks bro !

  • @Matt24-r1o
    @Matt24-r1o 21 วันที่ผ่านมา

    ok i've got a question, when using sets when you say that you can add or remove an element but cannot change a value, not being able to change a value is that due to the set being unordered to begin with?, like i can add or remove but i can't change say if i have a 2 i can't change that to a 3 and that's what is meant by being unable to change a value?. Sorry absolute beginner here so i want to make sure i understand exactly what is meant by being unable to change a value.

  • @vie1z814
    @vie1z814 3 ปีที่แล้ว +1

    Thx Senpai

  • @boriskalashnikov8595
    @boriskalashnikov8595 ปีที่แล้ว +1

    isnt eh {} are dictionaries and sets are (())?

  • @hailsnover6214
    @hailsnover6214 3 ปีที่แล้ว

    wow this seems very useful

  • @melihhopa2684
    @melihhopa2684 2 ปีที่แล้ว

    NİCEEEE

  • @varunwind
    @varunwind 2 ปีที่แล้ว

    Thank you. :)

  • @ahmetunaldi7601
    @ahmetunaldi7601 3 หลายเดือนก่อน

    bro code is great

  • @rayeesuraj7190
    @rayeesuraj7190 3 หลายเดือนก่อน

    You are a Pro,
    in the Python Bro .....
    🤩🤩😎😎

  • @Kotik112
    @Kotik112 3 ปีที่แล้ว

    An odd question perhaps, but what kind of situations do you use "sets" for? Why not stick with lists? What are the use cases?

    • @Owlrrex
      @Owlrrex 3 ปีที่แล้ว +1

      They're also great when you _want_ the uniqueness-property. If you use a list, an operation like appending lists has to be written by you (or a framework you use) to manually account for duplicate entries. Sets do it automatically, in C = faster again.

  • @oximas-oe9vf
    @oximas-oe9vf 2 ปีที่แล้ว

    is there any practical difference between "Ordered "and "Indexed"?

    • @unacuentafalsamas4417
      @unacuentafalsamas4417 2 ปีที่แล้ว

      If I am not wrong, you can look to an unordered array for example, you can get any element of the array by the index without being necessary go through each element, but is not in a proper order

  • @tarikyassa1076
    @tarikyassa1076 3 ปีที่แล้ว

    👍

  • @budderrar5751
    @budderrar5751 2 ปีที่แล้ว

    noice

  • @Taran_K
    @Taran_K 3 ปีที่แล้ว

    So the random printing only works with strings?

    • @luizcastro5246
      @luizcastro5246 3 ปีที่แล้ว

      it also makes string interpolate randomly between ints if you have both in a set.

  • @shamaeelahmed3561
    @shamaeelahmed3561 2 ปีที่แล้ว +1

    Better than my paid course

  • @godswillshouseofcomedy7253
    @godswillshouseofcomedy7253 ปีที่แล้ว

    Yea I did

  • @MoDiscovery
    @MoDiscovery 2 ปีที่แล้ว

    W Bro Code

  • @shanchar
    @shanchar 2 ปีที่แล้ว

    For the algorithm.

  • @mikoajnowakowski149
    @mikoajnowakowski149 2 ปีที่แล้ว

    : D

  • @pbsmoothie7281
    @pbsmoothie7281 2 ปีที่แล้ว

    TH-cam algorithm comment

  • @hamzaammar4356
    @hamzaammar4356 3 ปีที่แล้ว

    ;)

  • @xeurek4
    @xeurek4 ปีที่แล้ว

    bro codes

  • @rondomzneta6972
    @rondomzneta6972 ปีที่แล้ว

    mnom

  • @bushragul2321
    @bushragul2321 ปีที่แล้ว

    I am the first one to dislike to I deserve a shoutout

  • @StudyMan-e1n
    @StudyMan-e1n หลายเดือนก่อน

    Thanks

  • @naylinaung4688
    @naylinaung4688 3 ปีที่แล้ว

    nice