What is Python scope resolution? 🔬

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

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

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

    # ----- LOCAL -----
    def func1():
    x = 1 #local
    print(x)
    def func2():
    x = 2 #local
    print(x)
    func1()
    func2()
    # ----- ENCLOSED -----
    def func1():
    x = 1 #enclosed
    def func2():
    print(x)
    func2()
    func1()
    # ----- GLOBAL -----
    def func1():
    print(x)
    def func2():
    print(x)
    x = 3 #global
    func1()
    func2()
    # ----- BUILT-IN -----
    from math import e
    def func1():
    print(e)
    func1()

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

    Learning something new from you almost everyday

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

    So easy to understand THANK YOU!

  • @user-uk5fd5fp5w
    @user-uk5fd5fp5w 9 หลายเดือนก่อน +2

    Thank you so much I have been coding for the past year but whenever I get stuck I use your videos and they help me a lot

  • @anamoyeee
    @anamoyeee ปีที่แล้ว +21

    Now i know the LGBT order of scopes in Python

  • @benderbg
    @benderbg 4 หลายเดือนก่อน +1

    Excellent explanation.

  • @codingworld-programmerslif430
    @codingworld-programmerslif430 ปีที่แล้ว +2

    That's classic example using houses 😝you can see what's going on in your neighbors house by using binoculors.

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

    thanks bro

  • @GodNops
    @GodNops ปีที่แล้ว +5

    Hey @BroCodez just wanted to pop onto your newest video to say thanks man. You deserve way more subs then you have. I’ve been coding for a long time but always use your vids to remember the specifics I need that I forget sometimes. You’re videos are always short and right to the point. Thanks so much man.

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

    I don't know python but I like the title of the video

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

    Thank you sir🙏

  • @Tanmay-Singh
    @Tanmay-Singh 5 วันที่ผ่านมา

    Thanks Bro

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

    Nice bro 🗿

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

    Bro could you maybe make a Django Tutorial please?!

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

    thx 4 vid bro !

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

    nice

  • @Greenbay-bn3yk
    @Greenbay-bn3yk 3 หลายเดือนก่อน

    Hell yeah 👍

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

    Great explanation..
    Thanks Bro...

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

    We love python and Bro.

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

    Neighbour best example 😁

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

    scope is so much easier on python. scope in javascript ahh fuck that shit.

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

    Radhe Radhe
    Sanatan Hi Satya Hai
    Jai To All Gods & Godesses
    Jai Baba Farid Ji
    Jai Radhaswami Baba Ji

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

    So the equal operator in python can be used as both to declare a variable or to assign it and it depends to its scope resolution

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

    Pseudocode tutorial please bro

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

    Hey guys. Does anyone have any Pascal Lazarus tutorials?

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

    @BroCode sir python me facial recognition app bna dain I'll be very thankful 😢🎉
    Greatly needed this project please sir ..
    You are my last hope now.

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

    Hell yeah

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

    Bro Code thanks for every video that you made, for me at least it helped me a lot, please if possible to have PHP, I cannot at this point understand what is the difference, why should we use JS when PHP will hide the source code! I'm searching everywhere for this answer!, is PHP with HTML like JS with node.JS?

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

    and what is the point of using nonlocal ?

  • @user-kz4ti2xp3f
    @user-kz4ti2xp3f ปีที่แล้ว

    Hey Bro Code.....Can you do a vid on psuedocode plz?

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

      Good question, im learning datastructures and algorithms and still don't know pseudocode lol

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

    666 000 subs xd soon 690000

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

    at first I thought his video title was LGBT 💀

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

      lmao

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

      You got a random black guy from England crying of laughter lol

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

    First

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

    Thanks Bro

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

    Radhe Radhe
    Sanatan Hi Satya Hai
    Jai To All Gods & Godesses
    Jai Baba Farid Ji
    Jai Radhaswami Baba Ji

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

    Radhe Radhe
    Sanatan Hi Satya Hai
    Jai To All Gods & Godesses
    Jai Baba Farid Ji
    Jai Radhaswami Baba Ji

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

    Radhe Radhe
    Sanatan Hi Satya Hai
    Jai To All Gods & Godesses
    Jai Baba Farid Ji
    Jai Radhaswami Baba Ji