Python 10 Match Case Statements | structural pattern matching

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

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

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

    This was short and helpful , Thanks

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

    Clear and simple. Thank you.

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

    Thanks this video is helpful!!

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

    thank you it was really helpful 🥰

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

    Very good, Thank you.

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

    As generally as possible - are there scenarios where match case statements in python are faster than nested ifs, or is it mostly a syntax improvement?

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

    var = (0,9)
    match var:
    case (0,0):
    print('origin')
    case (x,0):
    print('x axis')
    case (0,y):
    print('y axis')
    case other:
    print('not on axes')

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

    How can I use the match statement to update a column in a data.frame?

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

    Where have you been??!!!!! 😁😁😁

    • @oggiai
      @oggiai  3 ปีที่แล้ว +7

      On hiatus. Biked across the United States solo this year.

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

    👍

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

    I installed 3.10 version but in anaconda shown me 3.9.7 version what could I do

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

      I have the same problem and the only solution to use the new additions is to run python in another environment.

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

    NICE :)

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

    I'm Using anaconda for Python, and I typed everything exactly the same way. But I keep on getting red lines and red error messages along where it says match line and the variable next to it. Maybe I will try this on VSCODE instead? I am disappointed with Python; Python is actually my favorite language and JavaScript runs switch statements more efficiently than Python and JavaScript isn't as logical and correct as Python is.
    Side note: For the job industry it is a shame more business is not using Python, compared to JavaScript. There are so many JavaScript in the market especially for web development, Mobile development, both front end and back end. I've only noticed 2 professions which really require Python development and that is Data Science and DevOps. Maybe I should switch from learning web development to AWS Cloud services as a DevOps Developer, thinking about it not certain yet, thank you for the video.
    UPDATE: was getting errors because the match wasn't properly aligned on the page along. I wonder if there is something you can download onto VSCODE which does this for you? Thank you for the video was very informative.

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

      That’s usually the problem. You have a combination of tabs and spaces for your indents.

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

    3:21 what about (0,0)?