What is Nostr?
Anthropy :verified_dragon: /
npub1umd…cfwh
2024-05-31 17:00:10

Anthropy :verified_dragon: on Nostr: Did you know you can specify parameters with an if/else statement inside a function ...

Did you know you can specify parameters with an if/else statement inside a function call in python?

e.g:
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

is completely valid in python3.
Author Public Key
npub1umdyk0pm4euzhlkplpzl3eqa5ws4ksujpwnxpw8pjk6r4rhpx63qpwcfwh