इस कोड को निम्न त्रुटि संदेश देता है: in_f रूपलेखन त्रुटि: यूनिकोड को मजबूर: जरूरत स्ट्रिंग या बफ़र
- खुला साथ
(बफरिंग = -1 infile, मोड = 'आर',), खुला (outfile , मोड = 'w', बफरिंग = -1) out_f के रूप में: लेखन त्रुटि: यूनिकोड को मजबूर: जरूरत स्ट्रिंग या बफर, फ़ाइल
# Opens each file to read/modify infile=open('110331_HS1A_1_rtTA.result','r') outfile=open('2.txt','w') import re with open (infile, mode='r', buffering=-1) as in_f, open (outfile, mode='w', buffering=-1) as out_f: f = (i for i in in_f if i.rstrip()) for line in f: _, k = line.split('\t',1) x = re.findall(r'^1..100\t([+-])chr(\d+):(\d+)\.\.(\d+).+$',k) if not x: continue out_f.write(' '.join(x[0]) + '\n')
कृपया कोई मुझे मदद नहीं मिली।
इतना भयानक भयानक। धन्यवाद! –