| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- 파이썬 포렌식
- Daily Commit
- flask
- Sequential Search
- 파이썬머신러닝완벽가이드
- collections.deque
- codesignal
- 백준
- 2015 봄학기 알고리즘
- almostIncreasingSequence
- C++
- cpp
- 피보나치 수
- baekjun
- Counting cells in a blob
- 2750
- centuryFromYear
- Python
- data_structure
- shapeArea
- matrixElementsSum
- All Longest Strings
- markdown
- til
- 10953
- 수 정렬하기
- codesingal
- adjacentElementsProduct
- Numpy
- recursion
Archives
- Today
- Total
Introfor
1 본문
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | __author__='Introfor' import string """ The first method def decoding(str): global result result ='' for i in str: if(ord(i)==32 or ord(i)==39 or ord(i)==46 or ord(i)==40 or ord(i)==41): result +=i elif(ord(i)==121): result+='a' elif (ord(i) == 122): result += 'b' else: result+=chr(ord(i)+2) return result str1="g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj." str2='map' #print decoding(str1) #print decoding(str2) """ #The second method intab = 'abcdefghijklmnop' outtab = 'cdefghijklmnopqr' result = string.maketrans(intab,outtab) str = 'map' print str.translate(result) | cs |
'Programming_prob > Python_Challenge' 카테고리의 다른 글
| 4 (0) | 2016.11.28 |
|---|---|
| 3 (0) | 2016.11.28 |
| 2 (0) | 2016.11.21 |
| 0 (0) | 2016.11.17 |
Comments