摘要: string=input('请输入一个字符串:') lst=list(string) #使用列表,将列表转化为字符串 lst.reverse() print(''.join(lst)) 阅读全文
posted @ 2021-01-09 21:19 clearlove007 阅读(437) 评论(0) 推荐(0)
摘要: import random number = int(random.uniform(1,10)) attempt = 0 while (attempt < 3): m = int(input('请试着猜猜数字:')) if m == number: print('答对了!') break elif 阅读全文
posted @ 2021-01-09 21:18 clearlove007 阅读(231) 评论(0) 推荐(0)
摘要: 创建新的类并继承Thread(Thread必须重写run()方法) public class MyThread extends Thread{ public static void main(String[] args) @Override //重写run()方法 public void run() 阅读全文
posted @ 2021-01-09 21:17 clearlove007 阅读(62) 评论(0) 推荐(0)