python recipe book Memo

URI encoding

urllib.quote('Irohanihohe')
>Irohanihohe

URI decoding

 urllib.unquote('Irohanihohe')
>Irohanihohe

zip function

sample = ['aaa', 'bbb']
sample2 = ['222', '333']

print zip(sample, sample2)
> [('aaa', '222'), ('bbb', '333')]

enumerate function

sample = ['aaa', 'bbb']

for num, sam in enumerate(sample):
	print num, sam
> 0 aaa
> 1 bbb

Recommended Posts

python recipe book Memo
Python memo
python memo
Python memo
python memo
Python memo
Python memo
Python memo
Python3 compatible memo of "python start book"
python beginner memo (9.2-10)
python beginner memo (9.1)
★ Memo ★ Python Iroha
[Python] EDA memo
Python 3 operator memo
[My memo] python
Python3 metaclass memo
[Python] Basemap memo
Python beginner memo (2)
[Python] Numpy memo
Python class (Python learning memo ⑦)
My python environment memo
python openCV installation (memo)
Python module (Python learning memo ④)
Visualization memo by Python
Python test package memo
[Python] Memo about functions
Binary search (python2.7) memo
[My memo] python -v / python -V
Python3 List / dictionary memo
[Memo] Python3 list sort
Python Tips (my memo)
[Python] Memo about errors
Python basic memo --Part 2
Basic Python command memo
Python OpenCV tutorial memo
Python basic grammar memo
TensorFlow API memo (Python)
python useful memo links
Python decorator operation memo
Python basic memo --Part 1
Effective Python Memo Item 3
Divisor enumeration Python memo
Python exception handling (Python learning memo ⑥)
Python execution time measurement memo
Twitter graphing memo with Python
[Line / Python] Beacon implementation memo
Python and ruby slice memo
Python Basic Grammar Memo (Part 1)
Python code memo for yourself
Python immutable type int memo
Python memo using perl --join
Python data type summary memo
Python basic grammar (miscellaneous) Memo (2)
[MEMO] [Development environment construction] Python
[Python] virtualenv creation procedure memo
Python basic grammar (miscellaneous) Memo (4)
Regarding speeding up python (memo)
Python control syntax, functions (Python learning memo ②)
Python environment construction memo on Windows 10
Difference between java and python (memo)
[Python] Operation memo of pandas DataFrame