上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 82 下一页
摘要: 1. #快速生成1,2,3,..., 100数字列表: print([i for i in range(1,101)]) 2. #快速生成001,002,003,...,100数字列表: print([f"{i:03}" for i in range(1,101)]) 或者不用f-string pr 阅读全文
posted @ 2020-05-29 09:07 profesor 阅读(2445) 评论(0) 推荐(1)
摘要: Java import java.util.Scanner; public class compare { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print 阅读全文
posted @ 2020-05-29 08:57 profesor 阅读(635) 评论(0) 推荐(0)
摘要: 用Python处理/生成JSON文件 先看个python list/array: my_list = [ {"Jerry": {"job": "comedian", "age": 34, "married": True,},}, {"Elaine": {"job": "housewife", "ag 阅读全文
posted @ 2020-05-28 16:14 profesor 阅读(584) 评论(0) 推荐(0)
摘要: String.format(); System.out.printf(); System.out.format() 阅读全文
posted @ 2020-05-27 11:02 profesor 阅读(291) 评论(0) 推荐(0)
摘要: JAVA: import static java.lang.System.out; public class Ternary { public static void main(String[] args) { int a = 4, b = 5; out.println(++a == b-- ? a 阅读全文
posted @ 2020-05-27 09:45 profesor 阅读(209) 评论(0) 推荐(0)
摘要: 体会宏的定义方法 阅读全文
posted @ 2020-05-27 09:31 profesor 阅读(1384) 评论(0) 推荐(0)
摘要: Python ONE-LINER LIST COMPREHENSION 阅读全文
posted @ 2020-05-27 08:41 profesor 阅读(210) 评论(0) 推荐(0)
摘要: JAVA public class Args { public static void main(String[] args) { // for (String arg : args) // System.out.println(arg); //或者下面的遍历方法 for (int i = 0; i 阅读全文
posted @ 2020-05-26 23:38 profesor 阅读(205) 评论(0) 推荐(0)
摘要: /* 典型的Switch-case程序题: 成绩等级划分: >= 90 A >= 80 B >= 70 C >= 60 D < 60 E */ import java.util.Scanner; public class SwitchInt { public static void main(Str 阅读全文
posted @ 2020-05-26 10:47 profesor 阅读(1137) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { char a[] = "The quick brown fox jumps over the lazy dog."; a[4] = '\0'; //a[] = "The \0uick brown fox jumps over the l 阅读全文
posted @ 2020-05-26 10:18 profesor 阅读(965) 评论(0) 推荐(0)
上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 82 下一页