Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Untitled diff
생성일
11년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
11 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
20 행
복사
10 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
20 행
복사
def check(types, value):
def check(types, value):
value = int(value)
value = int(value)
복사
복사됨
복사
복사됨
if types
==
"cats:"
or types ==
"trees:"
:
if types
in (
"cats:"
,
"trees:"
)
:
return props[types] < value
return props[types] < value
복사
복사됨
복사
복사됨
elif types
==
"pomeranians:"
or types ==
"goldfish:"
:
elif types
in (
"pomeranians:"
,
"goldfish:"
)
:
return props[types] > value
return props[types] > value
return props[types] == value
return props[types] == value
props = {}
props = {}
with open("inpt.txt") as g:
with open("inpt.txt") as g:
for line in g:
for line in g:
복사
복사됨
복사
복사됨
line = line.strip(
"\n"
).split(
" "
)
line = line.strip(
).split(
)
props[line[0]] = int(line[1])
props[line[0]] = int(line[1])
with open("input16.txt") as f:
with open("input16.txt") as f:
for line in f:
for line in f:
복사
복사됨
복사
복사됨
line = line.strip(
"\n"
).split(
" "
)
line = line.strip(
).split(
)
if
(check(line[
2
], line[
3
].strip(","))
and check(line[4], line[5].strip(",")) and check(line[6], line[7]
)):
if
all
(check(line[
i
], line[
i+1
].strip(","))
for i in range(2,7,2
)):
print line
print line
저장된 비교 결과
원본
파일 열기
def check(types, value): value = int(value) if types == "cats:" or types == "trees:": return props[types] < value elif types == "pomeranians:" or types == "goldfish:": return props[types] > value return props[types] == value props = {} with open("inpt.txt") as g: for line in g: line = line.strip("\n").split(" ") props[line[0]] = int(line[1]) with open("input16.txt") as f: for line in f: line = line.strip("\n").split(" ") if (check(line[2], line[3].strip(",")) and check(line[4], line[5].strip(",")) and check(line[6], line[7])): print line
수정본
파일 열기
def check(types, value): value = int(value) if types in ("cats:", "trees:"): return props[types] < value elif types in ("pomeranians:", "goldfish:"): return props[types] > value return props[types] == value props = {} with open("inpt.txt") as g: for line in g: line = line.strip().split() props[line[0]] = int(line[1]) with open("input16.txt") as f: for line in f: line = line.strip().split() if all(check(line[i], line[i+1].strip(",")) for i in range(2,7,2)): print line
비교하기