Comandos não tão básicos de Python

lista de algumas solução interessantes

Jeito rebuscado de criar uma LISTA

Para criar uma lista de números pares com raiz quadrada perfeita:

>>> sqdEvens = [x ** 2 for x in range(8) if not x % 2]
[0, 4, 16, 36]

Switch-case em Python

bytebaker.com/2008/11/03/switch-case-statement-in-python

resumo: usar uma busca de dicionário.

options = {0 : zero,
                1 : sqr,
                4 : sqr,
                9 : sqr,
                2 : even,
                3 : prime,
                5 : prime,
                7 : prime,
}

def zero():
    print "You typed zero.\n"

def sqr():
    print "n is a perfect square\n"

def even():
    print "n is an even number\n"

def prime():
    print "n is a prime number\n"

execução:

options[num]()

Lambda

Funcao para gerar uma funcao simples de uma linha atraves de uma variavel.

um exemplo de uso:

>>> adicao3 = lambda x: x+3
>>> adicao3(5)
8

 

If you are interested in investing in virtual currency,
You may have heard of the ‘Binance’ exchange.

바이낸스
That’s because this exchange is currently the virtual currency exchange with the most users in the world.
Today, I would like to introduce a brief introduction of this exchange, the advantages you can feel, and even joining Binance.

​​바이낸스 레퍼럴
https://bitcoinxxo.com/

 
 

hello. Today’s post will tell you how to sign up for Binance’s maximum fee discount using a referral code that is easy to understand even for beginners.
coin-viewer.com

 
 

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work… Boostaro

 
 

The referral fee discount promotion is a must, not an option, because it offers a 20% discount on transaction fees. CoinViewer has officially partnered with Binance to provide a referral code with a 20% discount on transaction fees.coin-viewer.com/%eb%b0%94%ec%9d%b4%eb%82%b8%ec%8a%a4-%ec%b6%94%ec%b2%9c%ec%9d%b8-%ed%9a%8c%ec%9b%90%ea%b0%80%ec%9e%85-%ec%8b%a0%ec%9b%90%ec%9d%b8%ec%a6%9d-%eb%b0%a9%eb%b2%95-%ec%88%98%ec%88%98%eb%a3%8c-%ed%95%a0/

 
 

Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though.https://www.outlookindia.com/outlook-spotlight/liv-pure-reviews-fraudulent-exposed-2023-beware-livpure-weight-loss-complaints-fake-side-effects-news-289349

 
 

Online multiplayer games enable players Geometry Dash to connect with friends and strangers alike, fostering a sense of community and camaraderie.

 
   

2048 welcomes everyone to visit