>>> girl <_io.TextIOWrapper name='D:\\python\\works\\girl_3.txt' mode='w' encoding='cp936'> >>> fgirl3 <_io.TextIOWrapper name='D:\\python\\works\\girl_3.txt' mode='w' encoding='cp936'> >>> girl==fgirl3 FalseThe process of how the variables were given the values:
f=open(r'D:\python\works\record.txt')
fboy1=open(r'D:\python\works\boy_1.txt','w')
fboy2=open(r'D:\python\works\boy_2.txt','w')
fboy3=open(r'D:\python\works\boy_3.txt','w')
fgirl3=open(r'D:\python\works\girl_3.txt','w')
fgirl2=open(r'D:\python\works\girl_2.txt','w')
fgirl1=open(r'D:\python\works\girl_1.txt','w')
for num in range(3):
boy=[fboy1,fboy2,fboy3][num]
girl=[fgirl1,fgirl2,fgirl3][num](I tried to insert the codes as code, but it's a failure when I clicked the referred button.)
buran write Jun-08-2021, 01:39 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
