6 Python Tips and Tricks YOU Should Know

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2024
  • Today I will be showing you some handy Python tips and tricks to improve your productivity. These shortcuts will help you code faster and smarter in Python in just 5 minutes. The most powerful of these tips will be towards the end of the video so make sure you stick around to really see how to make your code shorter and more efficient.
    ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. We made this TH-cam channel and Kite to help you be more productive: kite.com/download/?...
    Want more tips and tricks? JOIN our online community of people who want to level up their developer skills ► / 505658083720291
    Subscribe ► th-cam.com/users/KiteHQ?sub_...
    ***************************************
    Timestamps:
    0:35 - Swapping variables
    1:58 - Creating lists
    3:22 - List manipulation
    6:00 - Lambda functions
    #tipsandtricks #pythontutorials #python
    ***************************************
    Additional Python Resources
    Read and Write to CSV with Python ►
    • Python Tutorial - How ...
    Web Scraping Baby Yoda ►
    • WEB SCRAPING Baby Yoda...
    Best IDEs for Python ►
    • Best IDEs for Python
    ***************************************
    Be sure to subscribe for tutorials, project breakdowns and more!
    th-cam.com/users/KiteHQ?sub_...
    STAY TUNED:
    Kite ► kite.com/
    TH-cam ► / @kitehq
    Twitter ► / kitehq
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @orctoloston5494
    @orctoloston5494 4 ปีที่แล้ว +105

    list(range(0,21,2)) seems a bit easier for the third task

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

      Yeah or i*2 for i in range range(0, 10)

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

      Comments: Saying simple things
      Me: Write that down........

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

      print("WRITE THAT DOWN! " * 2)

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

      Syntax error

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

      Mm, but in general you may not know the range or the starting point or you may just want to find out if your output is even or odd

  • @werlokcf7084
    @werlokcf7084 4 ปีที่แล้ว +68

    Underrate levels:
    Underrated
    Very underrated
    Extremely underrated
    This channel

  • @Ramdinpuia29
    @Ramdinpuia29 4 ปีที่แล้ว +10

    I just found the most underrated channel... Subscribed and notifications turned on! 😊 This video is so helpful (Hope you do morr basic stuffs for beginners like me) RESPECT

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

      thanks for the support!

  • @cameronairlie5228
    @cameronairlie5228 4 ปีที่แล้ว +27

    Very instructive and clear video. only thing is, is that if you are speaking and not programming then it appears more natural and engaging for you to look at the camera. I think it would make the video seem more down-to-earth :)

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

    Subscribed!! Useful and helpful content!! TY

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

    The first trick was enough for me to subscribe.

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

    Which extension do you use in lighting the code?

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

    Amazing !! Thank you

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

    Loved it! Subbed!

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

    What an awesome video! Thank you

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

    Really helpful for me...just I subscribed to your channel after watched this video

  • @mati3me
    @mati3me 4 ปีที่แล้ว

    simple explanations! thanks

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

    woooow cool , I loved the switch trick XOOOOOOO Thank you subed :)

  • @nikhilpatil2482
    @nikhilpatil2482 4 ปีที่แล้ว +7

    except reduce function i know all tricks but still it is good keep going man

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

    hei! just wondering> what theme do you use? :)

  • @SatyamKumar-rm1gq
    @SatyamKumar-rm1gq 4 ปีที่แล้ว +5

    You are awesome dude...
    Please make more videos on python . You are just wow!!!
    Thank you

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

    Superbly explained...

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

    Amazing Quality Content

  • @fgomez
    @fgomez 4 ปีที่แล้ว +8

    Another way with list comprehension
    instead of map -> square_list= [x**2 for x in numbers]
    instead of filter. -> evens_list= [x for x in numbers if x % 2 ==0]

    • @programmingtried1159
      @programmingtried1159 4 ปีที่แล้ว

      Ok but which is better?

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

      @@programmingtried1159 whichever works for you and easy for you.

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

      @@programmingtried1159 list comprehension is better in the case of using Python. Afterall, it is a OOP language and only provide minimum support to functional approaches.

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

    Hi bro thanks for video I have question what theme you are using ? Please Reply

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

    Great topics.Thanks. Do you have videos on python

  • @KiteHQ
    @KiteHQ  4 ปีที่แล้ว

    Like this video? Join the Kite Developer Community on Facebook for access to more resources + support from fellow Python developers. Time to level up! facebook.com/groups/505658083720291

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

    Realy usefully thank's.

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

      thanks for the support!

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

    Omg how come this channel is not on top yet, tysm for teaching tricks, 👍gonna watch all your python videos cause you really teach Nicly 😊.

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

    Thank you

  • @aslambagwan7759
    @aslambagwan7759 4 ปีที่แล้ว

    Great job

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

    is cramming everything into one line more efficient? is readability taken into account ?

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

    good stuff, lad

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

    Why fonctions callled in map and filter don't take the param n

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

    Cool Video dude

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

    Is Kite co-pilot as plagiarizing as GitHub co-pilot?

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

    Video quality ❤️🤤

  • @Mohammad-bb3lp
    @Mohammad-bb3lp 4 ปีที่แล้ว +3

    know keep going I will tell every python developer about your channel, I did know about this things bout it costs too much time

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

    My techniques to create even numbers till 20
    evens=list(range(2,21,2))
    print(evens)

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

    The tricks were nice but heres a tip, try setting up the camera so that you face it.

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

    So what exactly happens in the first trick? Isn't the cpu only able to assign one variable at a time? Keeping that in mind a should be assigned b and then b should be assigned new a(equivalent to b)

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

      python is far from cpu level

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

      @@tooru Ofc but there must be something going on in the background innit

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

    Thumbnail: _exists_
    Python Linter: _siren_

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

    good demo bro. subscribed

    • @KiteHQ
      @KiteHQ  4 ปีที่แล้ว

      Thanks for the sub!

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

    This is very great, but try to look at the camera more often as if you are talking to your audiences like from 0:00 to 2:48.

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

    some it also work for other language
    Example in lua:
    Trick 1:
    local a=1
    local b=2
    print(a,b) --Printing 1 2
    b,a=a,b
    print(a,b) --Printing 2 1
    trick 2:
    Actually don't work in lua

  • @skete1338
    @skete1338 4 ปีที่แล้ว

    This channel need 1m subs.
    It make me think that this channel was way more better than. The Chinese guy that only talk about his life that we don't really care and his tips that doesn't even works.

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

    Hi, thanks for this video... That's so amazing, but I am a person who is just about to learn python ... is there a video or channel to learn python for beginners?

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

    Please make a video on
    if __name__ == '__main__':
    main()

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

    Just started learning how to code.
    I do understand some of what you said though but it's still confusing 😅
    Great work with these tuts 👍

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

    Should I iPad 7th gen or loptop for programming ???

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

      tera baap . It depends, as mobile programming with an ipad or such can be quite expensive due to having to pay for apps that, on a laptop, would be free such as Jupiter or ‘juno’. However I guess if don’t mind spending around $20 for the best apps then mobility is worth it. At the end of the day, they are both good options but you have to pay for the mobility and accessibility like a premium.

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

      @@cameronairlie5228 but Jupiter and Juno is free for iPad

    • @cameronairlie5228
      @cameronairlie5228 4 ปีที่แล้ว

      tera baap Well yes and no.. technically you can get around the price wall but the two Jupyter apps on the App Store are 9.99 and 14.99. I’m not sure if you meant them or an off-brand app

    • @cameronairlie5228
      @cameronairlie5228 4 ปีที่แล้ว

      The official apps are I think cloud based so you can save you code and open it on a laptop

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

    Your content is extremely great but why ur channel not that much grown up..???

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

    Functions like `map` and `filter` are, interestingly, considered fairly unpythonic. You should generally use comprehensions instead:
    squares = [x**2 for x in number]
    Though this is trickier for reduce, which is still somewhat unpythonic, but can't always be replaced.

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

    Can I learn python as a first language?

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

      you can for sure ;but how about c for starting up and migrate to dynamic programing languages such as python later on... it will help you understand the concept of programing😉😉😉😉

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

    It's kinda funny that I got to this video by searching "Advanced Python". Yes TH-cam, I know what max, min, and lambda are. Thank you.

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

    Clever 8)

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

    PLEASE don't use map/filter. Use list comprehension instead. So much easier and more readable.

  • @nevil6147
    @nevil6147 4 ปีที่แล้ว

    How does Kite make money ??

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

    😃

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

    this voice... isn't he the one who narrates the TedEd videos? Thanks for the amazing tips!

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

    nice pl support and advice

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

    we know the thing in the thumbnail duhhh

  • @lingareddydanda448
    @lingareddydanda448 4 ปีที่แล้ว

    Instead of using double is equal to symbols i.e. == you can use "is" in place of "=="

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

    0 is even number?☺️

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

    It is really weird to watch someone talk to you, and looking away all the time. You could just leave the facecam window out of the video.
    Thanks for the content anyway, well explained!
    Still disturbing :)

  • @thingsiplay
    @thingsiplay 4 ปีที่แล้ว

    Calling min and max functions aren't special tricks or tips to show them on a dedicated video, with only 6 tricks. But the video is well made otherwise.

  • @hermantohermanto2968
    @hermantohermanto2968 4 ปีที่แล้ว

    U

    • @KiteHQ
      @KiteHQ  4 ปีที่แล้ว

      M

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

    Please make kite free

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

      Kite is free! :) Kite Pro, our upgrade option, is a paid subscription.

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

    Kite is buggy

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

    Good video but having a face cam in this video was kinda pointless I’m just looking at you reading a script? Feels awkward…

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

    he seems little bit bored