![](/img/trans.png)
[英]Python input name in searchbox and find file in folder with same name
[英]Python need to find the input table name from the file name
我有一個文件ABC_costing,我需要該文件中的ABC,因此我可以告訴腳本將數據放入表PROD。“ ABCproduction”中。
嘗試這個:
my_name = "ABC_costing"
prefix = my_name.split("_")[0]
new_name = "{}production".format(prefix)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.