s=["姓名:高淇\t","年龄:18\t","2022新年愿望:暴富"] with open(r"d:\duxie.txt","w") as f: f.write("hello world!\n") f.writelines(s) with open(r"d:\duxie.txt","r") as f: for line in f: print(line)
老师,我希望hello world下一行就是姓名那些,但是用了\n就跑到下下行去了,不用的话就都在一行,请问要怎么实现呢?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> ul { color: red; } </style> </head> <body> <ul> <li>你好</li> <li> <ul> <li>好的</li> <li>好的</li> <li>好的</li> </ul> </li> <li>你好</li> </ul> </body> </html>
这里改变样式直接用ul{}不就可以了,为什么要用ui li{}的后代选择器
老师您好,如果用bind和bind_class绑定响应函数的话,如果那个函数有多个参数呢,怎么传参?我用了lamada也不行
from tkinter import * root=Tk() root.title("哦哦哦") root.geometry("300x300+700+300") def test2(x,y): print("{0}和{1}是好朋友".format(x,y)) btn01.bind("<Button-1>",test2) btn01.pack() root.mainloop()
sql语句的结尾加不加;是不是没有影响
老师,我这边有一个疑问,就是我逆向了一个安卓的app,然后发现他app里面有个js文件,我怎么定位这个js文件中的加密参数生成函数
list.removeIf(Predicate.isEqual());
我感觉用这种方法更方便...按老师给定一个参数ele,这个ele是起到一个遍历作用吗?
这个为什么会报错?
老师,我这个运行的结果怎么和你的不一样
老师,不太理解读取的时候next()函数的意思,是每次读取都要写next()吗,我搜了next()说是用于返回迭代器的下一个项目,更迷惑了
插入朱茵图片后,id怎么是6,
有没有办法弄成5
你好老师,为啥我用新标签这个完全显示不了?没看出问题在哪儿 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .header{ width: 1400px; background-color: pink; } div{ margin-top: 10px; height: 600px; } .nav{ height: 80px; margin-top: 10px; background-color: pink; } .section{ width: 900px; margin-top: 10px; background-color: pink; height: 600px; float: left; } aside{ width: 480px; margin-top: 10px; background: pink; height: 600px; float: right; } .footer{ height: 80px; margin-top: 10px; background-color: pink; } </style> </head> <body> <header>头部</header> <nav>导航</nav> <div> <section>主要内容</section> <aside>侧边栏</aside> </div> <footer>脚部</footer> </body> </html>
老师,有两个问题:
django3中120节9分10秒 b'baizhan' 引号外面这个b是什么意思?
9分56秒 con. flushall()删除数据,在终端keys *操作已经删除,在网页上为什么还可以看到b'baizhan'?
X=np.reshape(X,(1,-1))[0] result_index=model_loaded.predict([tset_fft_features])[0] 这两句代码是什么意思呢
为什么我的main主要内容和侧边栏显示不出来,代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .container{ width: 1400px; margin: 0 auto; } .header{ height: 80px; margin-top: 10px; background:pink } .nav{ height: 80px; margin-top: 10px; background: pink; } .main{ height: 500px; margin-top: 10px; } .mian .left{ float: left; width: 900px; height: 500px; background: pink; } .mian .right{ float: right; width: 480px; height: 500px; background: pink; } .footer{ height: 80px; background: pink; } </style> </head> <body> <div class="container"> <div class="header">头部</div> <div class="nav">导航</div> <div class="main"> <div class="left">主要内容</div> <div class="right">侧边栏</div> </div> <div class="footer">脚部</div> </div> </body> </html>
请问下老师写的从大到小的冒泡排序这样可以吗?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637