python - Unpack list of strings inside another list of strings -


i have found multiple examples similar questions in want flatten list made of multiple lists e.g [[0,1][2,3][3,4]] 1 list. in case want unpack 1 item.

note using " * " operator work expand lists function arguments in following example. but, use instead " * " unpack files in scenario ?

unpack = ["file_1.txt", "file_2.txt", "file_3.txt"] if unpack:     subprocess.call(["mv", *unpack, "/destination_path"]) 

subprocess.call(["mv"] + unpack + ["/destination_path"]) 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -