내가 가진이 코드파이썬 파일에서 라인을 읽고 그들에게 합류
모든 파일을 열고 내가이 처럼 인쇄 할 가정이 모양result = ('Server:{0} # U:{1} # P:{2} # Pre:{3} # Tel:{4}\n{5}\n'.format(b,c,d,a,number,ctime))
print (result)
cmd = ("{0}{1}@{2}".format(a,number,b))
print (cmd)
에서 그들과 합류
with open ('ip.txt') as ip :
ips = ip.readlines()
with open ('user.txt') as user :
usrs = user.readlines()
with open ('pass.txt') as passwd :
passwds = passwd.readlines()
with open ('prefix.txt') as pfx :
pfxes = pfx.readlines()
with open ('time.txt') as timer :
timeout = timer.readline()
with open ('phone.txt') as num :
number = num.readline()
Server:x.x.x.x # U:882 # P:882 # Pre:900 # Tel:456123456789
[email protected]
그러나 출력은 다음과 같습니다.
Server:x.x.x.x
# U:882 # P:882 # Pre:900
# Tel:456123456789
900
[email protected]
새로운 출력 : -
Server:x.x.x.x # U:882 # P:882 # Pre:900 # Tel:['456123456789']
900['456123456789']@x.x.x.x
나는이 문제를 어떻게 해결할 수 있습니까?