Python如何開文字檔案?取出某一直行?with open(fpath,’r’) as f:     for line in f: lst = line.split()

加入好友
加入社群
Python如何開文字檔案?取出某一直行?with open(fpath,'r') as f:     for line in f: lst = line.split() - 儲蓄保險王

fpath=r’c:\Python\Radar_20221005\Matlab_For_RFSoC_RTS\Gain.txt’
L=[];Gain_I=[] ; Gain_Q=[]
with open(fpath,’r’) as f:
    for line in f:
        lst = line.split() #[‘32767′,’0’]
        L.append( lst )
        Gain_I.append( lst[0] )
        Gain_Q.append( lst[1] )
       
print(“Gain_I:”,Gain_I)
print(“Gain_Q:”,Gain_Q)
Python如何開文字檔案?取出某一直行?with open(fpath,'r') as f:     for line in f: lst = line.split() - 儲蓄保險王
 

加入好友
加入社群
Python如何開文字檔案?取出某一直行?with open(fpath,'r') as f:     for line in f: lst = line.split() - 儲蓄保險王

儲蓄保險王

儲蓄險是板主最喜愛的儲蓄工具,最喜愛的投資理財工具則是ETF,最喜愛的省錢工具則是信用卡

You may also like...

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *