top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • 7 hours ago
  • 1 min read

def chooser(val):

if val == "a":

yield from [1, 2]

else:

yield from [3, 4]

print(list(chooser("b")))


[Running] python3 -u "/Users/name/test/test42.py"

[3, 4]

[Done] exited with code=0 in 0.05 seconds

#Python PythonCoding #VSC

Try to run it!
Try to run it!

 
 
 

コメント


bottom of page