随笔分类 - Python
Applets written by Python, or something else about Python
摘要:假设需要解码的URL字符串为%21%26,则解码如下: 1.Python3 echo -n "%21%26" | python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"
阅读全文
摘要:注意:Python 版本 2.6+ 想要将 { "foo": "lorem", "bar": "ipsum" } 格式化为. { "foo": "lorem", "bar": "ipsum" } 1.用Python格式化JSON字符串 命令如下: echo '{"foo": "lorem", "ba
阅读全文
摘要:C #include <stdio.h> int main(void) { FILE *fptr = fopen("ip.txt", "w"); for(int k=1; k<255; k++){ for(int j=1; j<255; j++){ for(int i=1; i<255; i++){
阅读全文
摘要:C #include <stdio.h> int main(void) { FILE *fptr = fopen("code.txt", "w"); for(int i=0; i<=999999; i++) { fprintf(fptr, "%06d\n", i); } fclose(fptr);
阅读全文
浙公网安备 33010602011771号