B
B
balaava2022-01-09 18:08:03
Python
balaava, 2022-01-09 18:08:03

How to set multiple variables to different values ​​at once?

I want to assign different values ​​to several variables in one line through map
a, b, c = ?ranint(0,10)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2022-01-09
@SoreMix

If you are interested in random, choices will do
a,b,c = random.choices(range(0,10), k=3)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question