在红宝石中我可以做类似的事情:
key, *rest = ["key1", 1, 2, 3]
结果将是:
key = "key1" rest = [1, 2, 3]
有没有办法在python中做同样的事情?
python
python ×1